Forum Discussion

abdulmannan1991's avatar
6 years ago
Solved

SUM (Sub-Total) of custom values using Measure

Hello. Help needed please! I am unable to calculate the sub-total of custom values.   I created a table (MyTable) with 2 columns, as follows: Month Number Month 1 Month 1 2 Month 2 ...
  • amitchandak's avatar
    amitchandak
    6 years ago

    abdulmannan1991 , See if you can simplify it like this

    sumx(values(myTable[Month])

    Switch ( true(),
    max(MyTable[Month Number])<=1,'Savings % (Month 1)'[Savings % (Month 1) ,
    max(MyTable[Month Number])<=2,'Savings % (Month 1)'[Savings % (Month 2) ,
    max(MyTable[Month Number])<=3,'Savings % (Month 1)'[Savings % (Month 3) ,
    max(MyTable[Month Number])<=4,'Savings % (Month 1)'[Savings % (Month 4)
    )*[Monthly Spend]