Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Antoine5553
Contributor II
Contributor II

The selection of the master dimension does not affect the base dimension

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 :

Capture.PNG

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 ?

Labels (1)
3 Replies
steeefan
Luminary
Luminary

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can manage what fields get selected in a calculated dimension using Aggr(). See https://qlikviewcookbook.com/2016/01/scoping-selections-with-aggr/

-Rob

Antoine5553
Contributor II
Contributor II
Author

The Aggr() works to display these years but once a value is selected all the others disapears from the filter pannel