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 | 10 |
| CONCEPTO2 | 20 | 10 | 2 | 6 |
| GRAND TOTAL | 30 | 15 | 17 | 16 |
| CUMULATIVE TOTAL | 30 | 45 | 62 | 78 |
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] ) ) )
1 Reply
- Jihwan_KimSuper User
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] ) ) )