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
kampyy
Frequent Visitor

Measure to calculate distinct parent ID based on child ID attributes

Hi,
I have one Risk table with these columns.

Risk ID Control IDControl Status
11Closed
12Cancelled
13Open
21Closed
22Closed
31Open
32Closed


I want to create a Measure to """"Count Total of Distinct Risk ID, where none of the 'Control Status' is 'Open'."""
In short, the Measure should return 1 (i.e. Only Risk ID 2 has NO  'Control Status' = 'Open'.


Thanks alot.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kampyy , Try a measure like

 


countx(filter(summarize(Table, Table[Risk ID], "_1", countrows(filter(Table, Table[Control Status] <> "Open")) , "_2", countrows(filter(Table, Table[Control Status] = "Open"))), not(isblank([_1])) && isblank([_2])), [Risk ID])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@kampyy , Try a measure like

 


countx(filter(summarize(Table, Table[Risk ID], "_1", countrows(filter(Table, Table[Control Status] <> "Open")) , "_2", countrows(filter(Table, Table[Control Status] = "Open"))), not(isblank([_1])) && isblank([_2])), [Risk ID])

Thank you so much amit.
I was stuck on this measure from long time. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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