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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
tgjones43
Helper IV
Helper IV

Measure to identity values in one column which have multiple values in another column

Hi all

 

I need a measure to return True if there is more than one unique value for each unique value in another column. So in the below example, it should return False for value 1 in ID1 (as there is only 1 unique value in ID2) but True for value 2 in ID1 (because there are 2 unique values in ID2).

 

ID1ID2Value
1A1
1A2
1A3
2

A

1
2A2
2A3
2B1
2B2
2B3

 

Thank you!



1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@tgjones43 ,

Hope this Measure works for you:

Unique = IF( CALCULATE( DISTINCTCOUNT( 'Table'[ID2] ),
                 ALLEXCEPT( 'Table','Table'[ID1] )) = 1, 
                 "False", "True" )

rsbin_1-1719328988407.png

Regards,

View solution in original post

2 REPLIES 2
rsbin
Super User
Super User

@tgjones43 ,

Hope this Measure works for you:

Unique = IF( CALCULATE( DISTINCTCOUNT( 'Table'[ID2] ),
                 ALLEXCEPT( 'Table','Table'[ID1] )) = 1, 
                 "False", "True" )

rsbin_1-1719328988407.png

Regards,

@rsbin it does, thank you! As a calculated column, rather than a measure, but that's fine.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.