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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Hussain_R
Frequent Visitor

How to show a cost per unit with DAX?

I have 5 tables, Date, Sizes, Production, Expenses & Operations. The last 3 are fact and the rest are dimensions to generate report like below. img.png

 

I have a chart currently showing my daily production vs the budgeted. What I now want to create is a chart that allocates the total expense for the day over the unit of those that are produced that day. We currently produce 3 sizes battens of the same length. I tried using:

 

=CALCULATE(SUM(Expenses[Payment])/SUMX(ALL(Production),SUM(Production[Total]))*SUM(Production[Total]))

 

But this is not giving me the correct report. The report that I want would be formatted as Sizes used as filters with Date as categories and said measure as value. However, I do not know how to correctly calculate the cost per unit belonging to the size produced during the day.

 

P.S. Crosspost from Excel forum as I was asked to post this question here.

0 REPLIES 0

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.