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
julesdude
Post Partisan
Post Partisan

Getting Total Percentage in Card of Column with Percentages in Matrix Table

Hi all,

I have a table viz in my report with a card above it.

julesdude_0-1678147136909.png

I need the card 'Occupancy Total' to provide a percentage of the listed percentages - a kind of grand total percentage if you like.

The only condition is that it should not include any blank items.

To get the Occupancy column, I use this DAX:

Occupancy = 
DIVIDE([Total Leased Area (Current)], [Total Leasable Area (Current)], 0)

Is it possible to create a new measure, count the non blank rows in the Occupancy column, and calculate the percentage of the percentages? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @julesdude 

You can use the sumx() function first, then use divide() function

You can refer to the following example

Sample data 

vxinruzhumsft_0-1678254451689.png

RelatedMeasure

TotalValue = SUM('Table'[value])

Totalcount = COUNTROWS('Table')

Occupancy = DIVIDE([TotalValue],[Totalcount],0)

Displayed visual

vxinruzhumsft_1-1678254524207.png

 

Then create a measure to calculate percentage of occupancy

Occupany total = var _sum=SUMX(ALLSELECTED('Table'[Column1]),[Occupancy])
var _count=COUNTROWS(FILTER(ALLSELECTED('Table'[Column1]),[Occupancy]<>BLANK()))
return DIVIDE(_sum,_count)

Output

vxinruzhumsft_3-1678254632662.png

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @julesdude 

You can use the sumx() function first, then use divide() function

You can refer to the following example

Sample data 

vxinruzhumsft_0-1678254451689.png

RelatedMeasure

TotalValue = SUM('Table'[value])

Totalcount = COUNTROWS('Table')

Occupancy = DIVIDE([TotalValue],[Totalcount],0)

Displayed visual

vxinruzhumsft_1-1678254524207.png

 

Then create a measure to calculate percentage of occupancy

Occupany total = var _sum=SUMX(ALLSELECTED('Table'[Column1]),[Occupancy])
var _count=COUNTROWS(FILTER(ALLSELECTED('Table'[Column1]),[Occupancy]<>BLANK()))
return DIVIDE(_sum,_count)

Output

vxinruzhumsft_3-1678254632662.png

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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