Forum Discussion

Dimitris_Kats's avatar
4 years ago
Solved

Calculations based on month

Hello dear members,   In my model I have created an independed table with percentages from 1%-100% and I have  this formula : IF(DISTINCTCOUNT(Percentage[Value])>1, CALCULATE(SUM(Table1[Salary])...
  • Kishore_Kadhir's avatar
    4 years ago

    Hi Dimitris_Kats 

     

    You can create a measure with Switch statement:

    SWITCH(
    TRUE(),
    MAX('Table'[Month]) IN {"Jan", "Feb", "Mar"}, SUM(SALARY),
    MAX('Table'[Month]) IN {"Apr", ----- , "Dec"}, SUM(SALARY) + ([Selected Percentage] * SUM(Salary))
    )
    Hope this helps.
    Regards,
    Kishore