March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Hi,
I'm trying to calculate the running total for a table that has two columns Capacity input and Dummy Capacity. The total for the row should be Capacity input - dummy capacity. Example: line 1 in the table below should be 13 - 21 = -8.
Capacity input is the count of line items for each bin and Dummy Capacity is the average capacity per bin (this number can be hardcoded if it's going to make the calculation easier).
I looked around for a few ideas on how to write a DAX that could work, but I haven't been successful so far (you can see the output in the table below).
Here is the DAX:
Running total = calculate(
sumx(
Project,
sum(Project[Capacity input])-AVERAGE(Project[Dummy Capacity])
),
filter(
ALLSELECTED(Project),
Project[End_Date__c]<=MAX(Project[End_Date__c])
)
)
The table below should give me:
Row 1 = 13 - 21 = -8
Row 2 = -8 +32 - 21 = +19
Row 3 = 19 + 32 -21 = +30
Thanks in advance for any help that you can provide.
Best,
Jose
Solved! Go to Solution.
@steamexpert , Try with these changes
Running total = calculate(
sumx(
values(Project[End_Date__c bins]),
calculate(um(Project[Capacity input])-AVERAGE(Project[Dummy Capacity]))
),
filter(
ALLSELECTED(Project),
Project[End_Date__c]<=MAX(Project[End_Date__c])
)
)
@steamexpert , Try with these changes
Running total = calculate(
sumx(
values(Project[End_Date__c bins]),
calculate(um(Project[Capacity input])-AVERAGE(Project[Dummy Capacity]))
),
filter(
ALLSELECTED(Project),
Project[End_Date__c]<=MAX(Project[End_Date__c])
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |