Forum Discussion
Fragan
6 years agoHelper III
Custom total calculation for one column value
Hey, I have this table : I made a matrix visual out of it : What i want to do is change the totals to : For Attribute1 keep the totals For Attribute2, totals = totals...
- 6 years ago
I found a solution :
Mesure = SUMX( 'Data'; SWITCH('Data'[attributes]; "Attribut2";IF(HASONEVALUE('Data'[date]);CALCULATE(SUM(Data[value]);Data[attributes] = "Attribut2");CALCULATE(SUM(Data[value]);Data[attributes] = "Attribut2")/2); var a = 'Data'[attributes] return CALCULATE ( SUM ( 'Data'[value] );'Data'[attributes]=a) ))
Fragan
6 years agoHelper III
bheepatel with your solution all Attribute2 values will be divided by 12
amitchandak the idea seem good, but i want also the sub total of attribute2 to change :
I want the 482 to be 241.
amitchandak
6 years agoSuper User
Fragan , Sure You can share
- Fragan6 years agoHelper III
amitchandak https://easyupload.io/0a178t , as you can see your solution is working but only for line total :
I want it to work for column total too, (i.e: the 482 should become 241)
- Fragan6 years agoHelper III
I mean what im trying to do is to change the column subtotal of Attribute2 to (ColumnSubtotal/2)