Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a master dimension (Year) that select the past five years of my calendar dimension :
If([Calendar Year Month Year]>=year(today())-5 and [Calendar Year Month Year]<=year(today()),
[Calendar Year Month Year]
)
When I select a year on that master dimension, it dosn't select the same value in the initial dimension :
But I have some expressions that are based on the active selection of the initial dimension.
Is there a better way to do that pls ?
A better way do to this is to flag all the date values in the desired range directly in the script:
LOAD
//..
(([Calendar Year Month Year] >= Year(Today())-5) AND ([Calendar Year Month Year] <= Year(Today()))) AS InLast5Y
RESIDENT
Table;
Then use this new field for filtering.
You can manage what fields get selected in a calculated dimension using Aggr(). See https://qlikviewcookbook.com/2016/01/scoping-selections-with-aggr/
-Rob
The Aggr() works to display these years but once a value is selected all the others disapears from the filter pannel