Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |