Forum Discussion
sanjaymithran
6 months agoHelper II
Two measures with diffrent slicer selection for same column
Hi All, Thanks in advance,I tried with disconnected Date table but not getting what we want
- 5 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"
)
cengizhanarslan
6 months agoSuper User
First, create TWO disconnected slicer tables. These have no relationships to anything. Then create the measure below in your use.
Sales1 :=
CALCULATE(
SUM ( Fact[sales] ),
KEEPFILTERS(
TREATAS(
VALUES( Slicer1_Quarter[YearQuarter] ),
DimDate[YearQuarter]
)
)
)
Sales2 :=
CALCULATE(
SUM ( Fact[sales] ),
KEEPFILTERS(
TREATAS(
VALUES( Slicer2_Quarter[YearQuarter] ),
DimDate[YearQuarter]
)
)
)