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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Morganius
Frequent Visitor

Calculate Toner Usage - Total row doesn't sum up.

Dear Members,

I got stucked with what seems to be an easy ride, but apparently is above my skillset and somehow wasn't able to find out correct answer.

What I'm trying to calculate is how many toner units I will need based on the number of pages I'm printing per month.

 - MIF = Machine in field.

 - AMPV = Average Monthly print volume

 - Black Yield = Number of pages a toner can Print.

 

The formulas and model it is simple...

 Tables:

  • Print Volumes: it tells me, for each country, month and model, how many pages are printed.
  • Machine table: It tells me, how many machines of each model has each customer.

Formula:

  Potential Units = ( Number of pages printed per month / Toner Yield) * Number of machines

  Potential Units = CALCULATE(SUM((PrintVolumes[AMPV_Black]/PrintVolumes[Black_Yield]))*[# of MIF_Gap])

 

If you see below table, the calculation is working well in the level of model (lowest one) but when I go one level up, the sum up values doesn't work. You could see the Potential Toner Units BK and the Pages columns.

  Morganius_0-1714040689615.png

 

After thinking for a bit, I noticed is a BODMAS issue and I need to evaluate the expression for each row using SUMX but I'm not able to get the right DAX expression.

Incorrect Formula (actual) --> Potential = SUM(AMPV)/AVG(Yield) * Sum(MIF)

Correct Formula (future) -->Potential = sum(AMPV * MIF)/AVG(Yield)

 

Any help will be more than welcomed.

 

4 REPLIES 4
Morganius
Frequent Visitor

I tried to post the example several times but I alwas get an error...Morganius_0-1714127287629.png

 

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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