Forum Discussion
UNLOCK49
2 years agoRegular Visitor
Runnig Total as Row
Is it possible to display a cumulative total as a row instead of a column?”, example in this table i have a "TOTAL" row and a "CUMULAITVE TOTAL" 2021 2022 223 2024 CONCEPTO1 10 5 15...
- 2 years ago
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
expected result: = IF ( HASONEVALUE ( category[category] ), SWITCH ( SELECTEDVALUE ( category[Index] ), 3, CALCULATE ( SUM ( data[value] ), REMOVEFILTERS ( category[category], category[Index] ) ), 4, CALCULATE ( SUM ( data[value] ), REMOVEFILTERS ( category[category], category[Index] ), WINDOW ( 1, ABS, 0, REL, ALL ( 'year'[year] ), ORDERBY ( 'year'[year], ASC ) ) ), SUM ( data[value] ) ) )
Jihwan_Kim
Super User
2 years agoHi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
expected result: =
IF (
HASONEVALUE ( category[category] ),
SWITCH (
SELECTEDVALUE ( category[Index] ),
3,
CALCULATE (
SUM ( data[value] ),
REMOVEFILTERS ( category[category], category[Index] )
),
4,
CALCULATE (
SUM ( data[value] ),
REMOVEFILTERS ( category[category], category[Index] ),
WINDOW ( 1, ABS, 0, REL, ALL ( 'year'[year] ), ORDERBY ( 'year'[year], ASC ) )
),
SUM ( data[value] )
)
)