Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Adamo
Contributor III
Contributor III

Filter Dimension Using a Local Variable

Hi,

I am using Qlik Sense Business and I need help with the following.

I have a bar chart with 10 bar measures and 1 line graph

On the X axis I have as dimension WeekYear (example 19-2020),

I would like to filter Weekyear directly without using filters in each 11 variables.

Something like this is working without problem.

=IF( Aggr(Max(WeekSerial),WeekYear)>663 and Aggr(Max(WeekSerial),WeekYear)<669  ,WeekYear)

 NOTE: Weekserial is just a AUTONUMBER function for WeekYear from the first WeekYear to the last in the whole script.

I am trying to use Variable $(Max_weekserial_salesreport) in this dimension to REPLACE those values 663 and 669 but this do not works as says Dimension is Not Valid.

=IF( Aggr(Max(WeekSerial),WeekYear)>$(Max_weekserial_salesreport)-2 and Aggr(Max(WeekSerial),WeekYear)<$(Max_weekserial_salesreport)+5  ,WeekYear)

 

Note this  Max_weekserial_salesreport definition.

max({<Fecha={"=count(ClientID)>1"}>}WeekSerial)

 

Can anyone help me with that???

Labels (1)
0 Replies