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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

Line Chart


Hi All,

I am using line chart in my dashboard. It showing values as per dates.

Now my requirement is if user select a specific date from date filter then chart will show selected date as well last 3 dates.

at present its showing only the seleted date.

b1.png

Please help me regarding this.

1 Solution

Accepted Solutions
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi

PFA ,try this useful for u or not

View solution in original post

9 Replies
datanibbler
Champion
Champion

Hi soha,

try set analysis:

- The parameter 1 disregards all user selections to begin with

-> Then you can ´"calculate" (all dates bigger than (selected_date)-3 and smaller_equal (selected_date)

That would be sth like this

>> Sum({1<Date = {$(= '>' & (Getfieldselections(Date)-3))}>} Sales) <<

HTH

Best regards,

DataNibbler

soha1902
Creator
Creator
Author

I tried but it showing error in calculation message.

sujeetsingh
Master III
Master III

Use set analysis and take logic from this link

QlikView App: Set Analysis - Prior Period Comparison

sujeetsingh
Master III
Master III

One thing that i will suggest is that sort the date dimension in your script.

Assign them values as Rank 1,2,3....etc.

Now you need use calculated expression for the chart.

Now the logic which will work is like take dimension where Rank< current selected date rank and rank>=current selected rank-3.

Here current selected rank can be taken as variable

vRank=if(len(getfieldselected(Date))>0,Rank)

soha1902
Creator
Creator
Author

Hi Sujeet thanks you very much for your help.

Can you please share or update attached qvw file for better understanding.

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi

PFA ,try this useful for u or not

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Soha ,

What else need,this application is working

SunilChauhan
Champion II
Champion II

see the attched file

Sunil Chauhan
soha1902
Creator
Creator
Author

Sorry Perumal..I didn't saw your solution.

Thank you very much.