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.
But the SUM is missing:
Hi Pikachu-Power ,
Not very clear about your description... If you want more filters like table [layer] = "blue", you can use the in function
Step description:
1. First use the summrize function to find a virtual table, which is grouped by Layer and some of the largest values of the date:
2. Use the IN function to select the desired Layer
Here are the steps you can follow:
1. Create measure.
Blue_Yellow =
var _summrize=
SUMMARIZE('Table','Table'[Layer],
"value",MAX('Table'[Value]),
"date",MAX('Table'[Date])
)
return
CALCULATE(SUM('Table 2'[Value]),FILTER('Table 2','Table 2'[Layer] in {"Blue","Yellow"}))2. Result.
You can downloaded PBIX file from here.
If my answer is not what you need, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
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.