Forum Discussion
Sugumaran31
2 years agoHelper I
Sub Total Calculation
Hi Guys, I need help from you Guys. I need to calculate the subtotal. please refer to the below images eg: 1,2,3,....,12 is a serial no. Based on Serial No, I need to add a measure or column ...
Anonymous
2 years agoNot applicable
Hi Sugumaran31 ,
The link to the dataset you provided could not be opened.
Also, for the situation you are facing, you can try the following DAX to create a new column:
Total =
IF(
'Table'[PDESCR] = "Total A.REVENUE",
SUMX(FILTER('Table', 'Table'[Index] >= 2 && 'Table'[Index] <= 3), 'Table'[Value]),
IF(
'Table'[PDESCR] = "Total B.EXPENSE",
SUMX(FILTER('Table', 'Table'[Index] >= 7 && 'Table'[Index] <= 11), 'Table'[Value]),
'Table'[Value]
)
)
The final output is as below:
However, I would still like to remind you that your data structure can lead to extremely complex calculations when there is a large amount of data, so please change to a more convenient data logging model.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sugumaran31
2 years agoHelper I
Hi Anonymous it's working in the column, but when I put in the visual it not working. I will share the image below