Forum Discussion
P567
2 years agoRegular Visitor
DAX Calculation - HELP
I have this summarized dataset grouped by multiple variables. This is a screenshot of a table I created from the dataset (other variables are being used as slicers), each index point has muli...
MargusMartsepp
2 years agoNew Member
You can create 2 separate running totals:
RunningTotal_2023 =
VAR CurrentIndex = MAX('Table'[Index])
RETURN
CALCULATE(
SUM('Table'[2023]),
FILTER(
ALL('Table'),
'Table'[Index] <= CurrentIndex
)
)
RunningTotal_2022 =
VAR CurrentIndex = MAX('Table'[Index])
RETURN
CALCULATE(
SUM('Table'[2022]),
FILTER(
ALL('Table'),
'Table'[Index] <= CurrentIndex
)
)
P567
2 years agoRegular Visitor
I should have cleared this ealier but the "Index" col is exactly not an index column. So I have a text field with 7 different values in it and I duplicated that col and just replaced those values with numeric values to able to sort them