skroutela
skroutela

Reputation: 125

Power BI - Comparing data at Row Level and concatenating the respective data in other column for same records

I want to show the consolidated data for similar record in separate column in power bi data.

I have a data with two columns and i want the result like below in third & fourth column

3rd column result nothing but comparing unique id in rows, e.g. 1=2 =false, 2=2=true 4th column result nothing but concatenation of Value column for unique record

could you please help to achieve this in power bi - i want to create custom columns for these two result in data table

enter image description here

Upvotes: 0

Views: 155

Answers (1)

msta42a
msta42a

Reputation: 3741

We can use CalculatedColumn in DAX:

Result = 

    CALCULATE(
        CONCATENATEX (
            CALCULATETABLE ( VALUES('Unique'[Value] ) ),
            'Unique'[Value],
            ", ",     
            'Unique'[Value],   
            ASC            
        ), ALL('Unique'[Value])
    )

And you Validation may be a measure:

Valid = if(SELECTEDVALUE('Unique'[Value]) = CALCULATE( max('Unique'[Value]), ALL('Unique'[Value])), FALSE(), TRUE())

enter image description here

Upvotes: 1

Related Questions