Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Need urgent help please

Hi Experts,   I need realy urgent help.   I have the data with Actual and Plan with 2018 Whole year data, and 2019 with the current month (March) data.   I just calculated the max month, but it...
  • PattemManohar's avatar
    PattemManohar
    7 years ago

    Anonymous  Thanks for the sample data.  Please add a New Column to the table as below

     

    MaxFlag = 
    VAR _MaxYear = MAX(Test299Slicer[Year])
    VAR _MaxPeriod = MAXX(FILTER(Test299Slicer,Test299Slicer[Year]=_MaxYear),Test299Slicer[Period])
    RETURN IF(Test299Slicer[Period]=_MaxPeriod,"Y","N")

    Then add a New Measure as below

    Test299 = CALCULATE(SUM(Test299Slicer[Amount]),Test299Slicer[MaxFlag]="Y")