Forum Discussion
Two measures with diffrent slicer selection for same column
- 6 months ago
Hi sanjaymithran , Thank you for reaching out to the Microsoft Community Forum.
Yes, switching to TREATAS will perform better. TREATAS applies a proper column filter (like a virtual relationship), which allows the Storage Engine to handle the filtering efficiently instead of iterating the whole table in the Formula Engine.
Rewrite your measure like this:
Sales1 =
CALCULATE(
SUM(Data[sales]),
TREATAS(VALUES(Slicer1[Quarter]), Data[Quarter]),
Data[ProdGroup] = "Term",
Data[Type] = "Actual"
)
Hi v-hashadapu ,
Thanks for your reply,I used below calculation but performance is very poor,is TREATAS will give better performance?
Sales1 =
CALCULATE(
SUM(Data[sales]),
FILTER('Data',Data[ProdGroup] = "Term"
&& Data[Type] = "Actual"
&& CONTAINS(VALUES(DateSlicer1),Slicer1[Quarter],Data[Quarter]))
)
Thanks,
Hi sanjaymithran , Thank you for reaching out to the Microsoft Community Forum.
Yes, switching to TREATAS will perform better. TREATAS applies a proper column filter (like a virtual relationship), which allows the Storage Engine to handle the filtering efficiently instead of iterating the whole table in the Formula Engine.
Rewrite your measure like this:
Sales1 =
CALCULATE(
SUM(Data[sales]),
TREATAS(VALUES(Slicer1[Quarter]), Data[Quarter]),
Data[ProdGroup] = "Term",
Data[Type] = "Actual"
)