This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a dataset below:
| Location | Name | age | income |
| UK | x | teen | low |
| UK | x | adult | low |
| UK | y | teen | high |
| USA | z | adult | low |
| USA | z | adult | high |
I want to point out mistakes in the dataset where for one person ( ie x or z), the age or income columns are not the same (when they should be)
I want to end up with a table visual in powerbi whereby it points out the discrepancy
| Location | Name | Discrepancy found? |
| UK | X | Y |
| UK | Y | N |
| USA | Z | Y |
What dax can i use to do this?
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, here's my solution. Create a measure.
Discrepancy found? =
IF (
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Location] = MAX ( 'Table'[Location] )
&& 'Table'[Name] = MAX ( 'Table'[Name] )
&& (
'Table'[age] <> MAX ( 'Table'[age] )
|| 'Table'[income] <> MAX ( 'Table'[income] )
)
)
) > 0,
"Yes",
"No"
)
Get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, here's my solution. Create a measure.
Discrepancy found? =
IF (
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Location] = MAX ( 'Table'[Location] )
&& 'Table'[Name] = MAX ( 'Table'[Name] )
&& (
'Table'[age] <> MAX ( 'Table'[age] )
|| 'Table'[income] <> MAX ( 'Table'[income] )
)
)
) > 0,
"Yes",
"No"
)
Get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Create a Calculated Column as shown below...
Discrepancy =
IF (
CALCULATE (
COUNT ( 'Table'[income] ),
FILTER (
'Table',
'Table'[Location] = EARLIER ( 'Table'[Location] )
&& 'Table'[Name] = EARLIER ( 'Table'[Name] )
)
) > 1,
IF (
DISTINCTCOUNT ( 'Table'[age] ) > 1
|| DISTINCTCOUNT ( 'Table'[income] ) > 1,
"Y"
),
"N"
)
Hi ddpl,
Thanks for submitting this, unfortunately it doesn't work as it doesn't fulfil the requirement of being able to indicate which ones have the same location & name, but different values for income or age.
If it helps, there will only ever be "teen" or "adult" values for age, and with Income it will only be "High", Low" or "N/a"
@Anonymous ,
can you share slightly more data with expected result.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 41 | |
| 21 | |
| 19 |