Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Solved! Go to Solution.
To ensure that the cumulative total is calculated correctly, we can take the following steps:
Check Sorting: Ensure that your data is sorted correctly. Cumulative totals depend on the data being sorted by the appropriate index or date column.
Modify the Formula: Let's refine the formula further to handle the cumulative total explicitly.
Here’s a modified version of the DAX measure:
CumulativeInvVol2 =
VAR CurrentRowIndex = MAX(IHR[Index])
VAR CurrentCategory = SELECTEDVALUE(IHR[Time Until Expiry (M)])
VAR CumulativeSum =
CALCULATE(
SUM(IHR[Inventory Volume]),
FILTER(
ALL(IHR),
IHR[Index] <= CurrentRowIndex &&
IHR[Time Until Expiry (M)] = CurrentCategory
)
)
RETURN
IF(ISBLANK(CurrentCategory), BLANK(), CumulativeSum)
this is the out pou im getting
To ensure that the cumulative total is calculated correctly, we can take the following steps:
Check Sorting: Ensure that your data is sorted correctly. Cumulative totals depend on the data being sorted by the appropriate index or date column.
Modify the Formula: Let's refine the formula further to handle the cumulative total explicitly.
Here’s a modified version of the DAX measure:
CumulativeInvVol2 =
VAR CurrentRowIndex = MAX(IHR[Index])
VAR CurrentCategory = SELECTEDVALUE(IHR[Time Until Expiry (M)])
VAR CumulativeSum =
CALCULATE(
SUM(IHR[Inventory Volume]),
FILTER(
ALL(IHR),
IHR[Index] <= CurrentRowIndex &&
IHR[Time Until Expiry (M)] = CurrentCategory
)
)
RETURN
IF(ISBLANK(CurrentCategory), BLANK(), CumulativeSum)
im unable to get grand total can you help me
Here's the updated version of your CumulativeInvVol measure to correctly display the grand total:
CumulativeInvVol =
VAR CurrentRowIndex = MAX(IHR[Index])
VAR CurrentCategory = SELECTEDVALUE(IHR[Time Until Expiry (M)])
VAR CumulativeTotal =
CALCULATE(
SUM(IHR[Inventory Volume]),
FILTER(
ALL(IHR),
IHR[Index] <= CurrentRowIndex && IHR[Time Until Expiry (M)] = CurrentCategory
)
)
VAR TotalVolumeForCategory =
CALCULATE(
SUM(IHR[Inventory Volume]),
ALL(IHR),
IHR[Time Until Expiry (M)] = CurrentCategory
)
RETURN
IF(
ISINSCOPE(IHR[Index]),
CumulativeTotal,
TotalVolumeForCategory
)
Here’s an adjusted approach for calculating the cumulative inventory volume:
Here is a modified version of your measure:
CumulativeInvVol =
VAR CurrentRowIndex = MAX(IHR[Index])
VAR CurrentCategory = SELECTEDVALUE(IHR[Time Until Expiry (M)])
VAR CumulativeTotal =
CALCULATE(
SUM(IHR[Inventory Volume]),
FILTER(
ALL(IHR),
IHR[Index] <= CurrentRowIndex && IHR[Time Until Expiry (M)] = CurrentCategory
)
)
RETURN
CumulativeTotal
This version simplifies the logic and ensures the cumulative total is calculated properly. Let me know if this works for your scenario, or if you'd like further clarification!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 13 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |