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.
Hello Power BI community,
I'm working on a maintenance dashboard and have an issue with a running total. I have calculated measures for tool supply and tool demand. The minimum of these 2 measures is the number of tools we will build in the given month. The tools are prioritized, and I want to calculate a running total of the minimum column to give us an idea of when we will run out of materials.
Priority | Tool | Supply | Demand | Minimum |
1 | Tool A | 97 | 112 | 97 |
2 | Tool B | 56 | 8 | 8 |
3 | Tool C | 44 | 0 | 0 |
4 | Tool D | 14 | 13 | 13 |
5 | Tool E | 20 | 11 | 11 |
6 | Tool F | 16 | 2 | 2 |
My equation looks like this:
Running Total = CALCULATE( MIN( [Supply] , [Demand] ) , FILTER( ALL( Asset_Mapping ), Asset_Mapping[ID] <= MAX( Asset_Mapping[ID] ) ) )
Measure | Measure | Result | Expected Result | |||
Priority | Tool | Supply | Demand | Minimum | Running Total | Running Total |
1 | Tool A | 97 | 112 | 97 | 97 | 97 |
2 | Tool B | 56 | 8 | 8 | 120 | 105 |
3 | Tool C | 44 | 0 | 0 | 120 | 105 |
4 | Tool D | 14 | 13 | 13 | 133 | 118 |
5 | Tool E | 20 | 11 | 11 | 144 | 129 |
6 | Tool F | 16 | 2 | 2 | 146 | 131 |
You can see that I don't get the result I expected. It seems to calculate the minimum of the running total and I would like to calculate the running total of the minimum. Any help is greatly appreciated. Thanks in advance.
Cheers,
Linds
Solved! Go to Solution.
Hi @LindsW8
I don’t have dataset with column Asset_Mapping[ID] as you used, so I use column [Priority] in your provided table instead. Anyway it works out your expected result.
Try formula below to calculate running total of minimum of two expressions
Measure 3 = CALCULATE ( SUMX ( Sheet2, MIN ( [Supply], [Demand] ) ), FILTER ( ALL ( Sheet2 ), Sheet2[Priority] <= MAX ( Sheet2[Priority] ) ) )
Best Regards
Maggie
Hi @LindsW8
I don’t have dataset with column Asset_Mapping[ID] as you used, so I use column [Priority] in your provided table instead. Anyway it works out your expected result.
Try formula below to calculate running total of minimum of two expressions
Measure 3 = CALCULATE ( SUMX ( Sheet2, MIN ( [Supply], [Demand] ) ), FILTER ( ALL ( Sheet2 ), Sheet2[Priority] <= MAX ( Sheet2[Priority] ) ) )
Best Regards
Maggie
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 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |