Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
YG
Contributor III
Contributor III

Qlik sense - How to get Line chart x/y axis between 2 values

Hi Qlikers,

I am new to this and I am having a challenge how to get data ONLY between 2 values.

I have 2 variables,

$(v_Curr_WeekNum) = 36

$(v_CurrWeek-12) = 22

I have a Line Chart,

YG_0-1600323688259.png

 

 

I want to limit the data that shows between $(v_CurrWeek-12)  and $(v_Curr_WeekNum)

something like this,

=week($(v_CurrWeek-12)> $(v_Curr_WeekNum) )

So far I got only either current  value or 12 weeks low value

How do I get the expression to show data points like   22,23,24,25,26,27,...... 36

Any help would be really appreciated. Thanks 

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

You can use expression in the dimension instead of the field directly. Try expression like:

=If(Week>=$(v_CurrWeek-12) and Week <=$(v_Curr_WeekNum), Week )

View solution in original post

2 Replies
tresesco
MVP
MVP

You can use expression in the dimension instead of the field directly. Try expression like:

=If(Week>=$(v_CurrWeek-12) and Week <=$(v_Curr_WeekNum), Week )

YG
Contributor III
Contributor III
Author

Thanks @tresesco  !! Work perfect