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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Want to get help on calculating a metric in the same column

Dear All,

 

I have the source data in an Excel file, with one single column called "Category" having multiple metrics. I am having issue in calculating a metric based on the 2 metrics that are in the same "Category" column. Could you please guide me in achieving this as both of them are in the same column. My calculation requirement is ((Required Capacity - Actual Capacity)/Required Capacity).

 

DAX Calc-1.png

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try measure like.

 

M1= calculate(Sum(Table[Value]) , Table[Category] = "Required Capacity")
m2 = calculate(Sum(Table[Value]) , Table[Category] = "Actual Capacity")

M3= divide([M1] -[M2], [M2])

 

 

In case you want to add a custom total

 

Power BI How to get the P&L with custom total : https://youtu.be/C9K8uVfthUU

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
Anonymous
Not applicable

@amitchandak , Thank you so much for your suggestion. I have now created 3 Measures for Actual Capacity, Required Capacity and Division calculation.

But, when I try to insert them in "Rows" field of Matrix visual it is not taking.

When I insert them in Values it is showing as columns; but I want them to be shown as rows and dates should be appearing in columns.

 

Please advise. Thanks

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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