Forum Discussion

Pikachu-Power's avatar
Pikachu-Power
Impactful Individual
5 years ago
Solved

KPI question

Hello all,   I have following situation:     Indicator for KPI is:   KPI_Indicator = CALCULATE(SUM(Table[Value]), Table[Layer] = "Blue", FILTER(Calender, Calender[Month] = MAX(Calender...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  Pikachu-Power  ,

    According to your description, I create this data:

    Here are the steps you can follow:

    1. Create measure.

    When the color is blue, the category is 1 and the maximum date:

    Blue_1 =
    var _1=MAXX(FILTER(ALL('Table'),'Table'[Categorie1]=1&&'Table'[Layer]="Blue"),'Table'[Date])
    return
    CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Layer]="Blue"&&'Table'[Date]=_1))

    When the color is yellow, category is 1 and the maximum date:

    Yellow_1 =
    var _1=MAXX(FILTER(ALL('Table'),'Table'[Categorie1]=1&&'Table'[Layer]="Yellow"),'Table'[Date])
    return
    CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Layer]="Yellow"&&'Table'[Date]=_1))

    2. Result.

     

    You can downloaded PBIX file from here.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.