Forum Discussion
jconte12
3 years agoFrequent Visitor
Not letting Filters effect a Visual
Good day!
My team is attempting to create a matrix visual that will bin sales in 12M intervals. We want the table to remain even if someone selects a year. However if someone selects any non-time based filter, we want the matrix to update with the new data. This is because we have other data in the report page. Ideally we could use edit interaction like you can in slicers, but this is not possible it seems. The matrix:
We created a custom column called "Time Period #" using the below DAX:
Time Period # = IF(Data[Time Period] = "L12M", 5, IF(Data[Time Period] = "P12M", 4, IF(Data[Time Period] = "Previous 25-36 M", 3, IF(Data[Time Period] = "Previous 37-48 M", 2, IF(Data[Time Period] = "Previous 49-60 M", 1,0))))).
Which led to the below measure (yoy calculation):
YoY Growth % = IFERROR( (CALCULATE( SUM( Data[MMS REVENUE]), FILTER(ALLSELECTED(Data), Data[Time Period #] = MAX(Data[Time Period #]))) - CALCULATE( SUM( Data[MMS REVENUE]), FILTER(ALLSELECTED(Data), Data[Time Period #] = MAX(Data[Time Period #]) - 1))) / CALCULATE( SUM( Data[MMS REVENUE]), FILTER(ALLSELECTED(Data), Data[Time Period #] = MAX(Data[Time Period #]) - 1)), BLANK())
Our goal is to keep this static from any time-based filters we have like below:
I've created a second measure with variables using removefilters but with no luck.
Rev Growth % Test =
var Max_Period = CALCULATE(SUM(Data[REVENUE]),FILTER(ALLSELECTED(Data), Data[Time Period #] = MAX(Data[Time Period #])))
var Max_Minus_1 = CALCULATE(SUM( Data[MMS REVENUE]), FILTER(ALLSELECTED(Data), Data[Time Period #] = MAX(Data[Time Period #]) - 1))
var Subtraction = Max_Period - Max_Minus_1
var division = CALCULATE(DIVIDE(Subtraction,Max_Minus_1),REMOVEFILTERS(Data[YEAR],DRG[FY],DRG[Time Period]))
return
division
Any help would be amazing and greatly appreciated!
1 Reply
- v-luwang-msftCommunity Support
Hi jconte12 ,
Could you pls share your sample data ,remember to remove confidential data.
Best Regards
Lucien
Best Regards
Lucien