Forum Discussion
KPI question
- Anonymous5 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.
Hello Liu,
Thanks for your reply. What i am looking for is somethink like:
Tab_Blue:
SUMMARIZE('Table','Table'[Categorie1],'Table'[Layer],
"value",MAX('Table'[Value]),
"date",MAX('Table'[Date])
)
with 'Table'[Categorie1] = 1 and 'Table'[Layer] = Blue (maybe it is possible to restrict the summarize table?) and
Tab_Yellow:
SUMMARIZE('Table','Table'[Categorie1],'Table'[Layer],
"value",MAX('Table'[Value]),
"date",MAX('Table'[Date])
)
with 'Table'[Categorie1] = 1 and 'Table'[Layer] = Yellow and final use these results in a KPI. Devide Tab_Blue / Tab_Yellow should be possible.
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.