Hi Power BI community,
I'm trying to calculate MTD totals for two factories. Here's some sample data.
PlantData
Date | Plant | Volume |
01-11-2020 | A | 2 |
01-11-2020 | B | 1 |
02-11-2020 | A | 2 |
03-11-2020 | A | 2 |
If I don't filter by Plant, when I create a table for a MTD calculation for November 3, I get this result:
Incorrect Result
Date | Plant | MTD |
03-11-2020 | A | 6 |
Total | 7 |
The issue is that the Table Total is including data from Plant B, even though there is no volume data for Plant B on November 3. What I'd like to see is this:
Correct Result
Date | Plant | MTD |
03-11-2020 | A | 6 |
Total | 6 |
Here's the DAX I'm using to calculate the MTD:
MTD = TOTALMTD(SUM('PlantData'[Volume]), 'PlantData'[Date])
What am I doing wrong? How can I fix this? I've tried a couple different solutions, and none have worked. Here are the solutions' links:
Solved: Table subtotal not excluding blank values - Microsoft Power BI Community
Measure Totals, The Final Word - Microsoft Power BI Community
Now I may not be applying the solutions correctly, but I don't think that's the case
Thanks for any help.
Sincerely,
Travis
Solved! Go to Solution.
Hi @TReynolds ,
You can create another measure as below to replace the previous measure [MTD]:
Measure = SUMX(VALUES('PlantData'[Date]),SUMX(VALUES('PlantData'[Plant]),[MTD]))
Best Regards
Hi @TReynolds ,
You can create another measure as below to replace the previous measure [MTD]:
Measure = SUMX(VALUES('PlantData'[Date]),SUMX(VALUES('PlantData'[Plant]),[MTD]))
Best Regards
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.
User | Count |
---|---|
436 | |
147 | |
120 | |
51 | |
49 |
User | Count |
---|---|
449 | |
132 | |
122 | |
80 | |
71 |