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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Calculated measure based on column values

I have a table with the following columns

Case#, Utilities, UtilityStatus

 

Each Case# has 4 utilites, let's call them A,B, C and D. Each utilities has the following status depending on current situation: complete and pending.

I want to have a measure that returns Complete if all 4 utilities are 'Complete' and Partial otherwise for each Case#

 

For illustration purposes:

Case#  Utilities  UtilityStatus

1111    A            Complete

1111    B            Complete

1111    C            Complete

1111    D            Complete

 

2222    A            Complete

2222    B            Complete

2222    C            Pending

2222    D           Complete

 

I want the measure to return Complete for 1111 & Partial for 2222

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

 

Measure =
var _table = summarize(Table, Table[Case#], "_1", Count(Table[Utilities]) , "_2", countx(filter(Table, Table[UtilityStatus] ="Complete"),Table[Utilities]))
return
maxx(_table, if([_1] =[_2], "Complete", "Partial"))

 

 

or

 

Measure =
var _table = summarize(Table, Table[Case#], "_1", Count(Table[Utilities]) , "_2", countx(filter(Table, Table[UtilityStatus] ="Complete"),Table[Utilities]))
return
calculate( maxx(_table, if([_1] =[_2], "Complete", "Partial")), allexcept(Table, Table[Case#]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try like

 

Measure =
var _table = summarize(Table, Table[Case#], "_1", Count(Table[Utilities]) , "_2", countx(filter(Table, Table[UtilityStatus] ="Complete"),Table[Utilities]))
return
maxx(_table, if([_1] =[_2], "Complete", "Partial"))

 

 

or

 

Measure =
var _table = summarize(Table, Table[Case#], "_1", Count(Table[Utilities]) , "_2", countx(filter(Table, Table[UtilityStatus] ="Complete"),Table[Utilities]))
return
calculate( maxx(_table, if([_1] =[_2], "Complete", "Partial")), allexcept(Table, Table[Case#]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.