Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Find differences in related records

I have a dimension table with a unique key column and a value column.

There is a one-to-many relationship with a facts table.

In the facts table, the value is sometimes incorrect.

How can I visualize all but only the records where the value in the facts table doesn't match the one in the dimension table?
It should show the key, the good value (from dim table) and the bad value (from facts table where the key matches but not the value, highlighted in red):

Beat_0-1648628525747.png

I thought this was quite easy to achieve, but I must be missing some important point.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

You can create a measure and use it in filter pane to show the reault you want.

Like this:

Measure = 
var a=SELECTEDVALUE('Dimension'[Value])
var b=SELECTEDVALUE(Facts[Value])
return IF(a=b,0,1)

vjaneygmsft_0-1649065166598.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

View solution in original post

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

You can create a measure and use it in filter pane to show the reault you want.

Like this:

Measure = 
var a=SELECTEDVALUE('Dimension'[Value])
var b=SELECTEDVALUE(Facts[Value])
return IF(a=b,0,1)

vjaneygmsft_0-1649065166598.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

Anonymous
Not applicable

@amitchandak this didn't work either. As soon as I include the 'incorrect' value from the facts table in the visual, it returns nonsense. Probably because my dimensions table covers only a portion of the facts table records. So I resorted to a left outer join merge to add the column with the incorrect values in order to display the correct and the incorrect values side by side in the same visual.

amitchandak
Super User
Super User

@Anonymous , You can create a new column in fact

 

if(related(Dimension[Value]) <> Fact[Value], 1, 0)  and then you can use this as flag in visual 

Anonymous
Not applicable

@amitchandak thanks for the prompt response! I already got to that point using a measure in row context, but what I struggle with is showing the incorrect value (from the facts table) next to the correct value in the dimension table. Will try with a column instead and let you know the outcome.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors