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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.