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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
geo_lan
New Member

Measures to calculate Count & Percentage based on summarised values

Hello,

 

I am looking for assistance please regards to the creation of 2 measures (to be used in card visuals) - one that displays a Count of Cost Centres (AB_CC) that are within budget, and another that displays the percentage of cost centres that are within budget. Please see below screenshot of an example table (ACCOUNT_BALANCES) to illustrate my issue:

 

geo_lan_0-1715789916394.png

 

From this table we can see the total variance for each cost centre is as follows:

 

geo_lan_2-1715795295549.png

 

So in total,   3 Cost Centres are under budget, which is   60% of all cost centres. These are the 2 measures I would like to formulate please if possible.

 

I have attempted some DISTINCTCOUNT and FILTER formulas, but in the case of the Count summation they keep returning a result of 4 which is incorrect.

 

Thank you

 
 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@geo_lan 

Pls try this

 

Measure =
var T=SUMMARIZE('Table','Table'[AB_CC],"ACTUAL2",SUM('Table'[ACTUAL]),"BUDGET2",SUM('Table'[BUDGET]))
RETURN COUNTROWS(FILTER(T,[ACTUAL2]<[BUDGET2]))
 
Measure 2 = [Measure]/DISTINCTCOUNT('Table'[AB_CC])
 
11.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@geo_lan 

Pls try this

 

Measure =
var T=SUMMARIZE('Table','Table'[AB_CC],"ACTUAL2",SUM('Table'[ACTUAL]),"BUDGET2",SUM('Table'[BUDGET]))
RETURN COUNTROWS(FILTER(T,[ACTUAL2]<[BUDGET2]))
 
Measure 2 = [Measure]/DISTINCTCOUNT('Table'[AB_CC])
 
11.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Yes that works, nice one ryan_mayu! Thank you

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors