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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
shree909
Partner - Specialist II
Partner - Specialist II

Date ranges in chart

Hi,

i have a  bar chart  with date  and Dimension 1 as Dimenions  and one expression.

i have  list boxes for Month, Year ,,

The issue i have is by default i have to select 30 days range in the chart with the Date..

i used dimension limits  to filter but its showing either first,largest 30 values..

i want to show it as a  last 30 days whaterver the expression values as ..

so when i filter on month its shows that month dates and values  but for default the chart is messed up with all the dates till today..

So how can i filter and show as last 30days in the chart by default.

My expression is = sum({<system_name ={'ABC'}> }factvalue)

Help would be really Appreciated..

1 Solution

Accepted Solutions
MayilVahanan

HI

Try with set analysis

= Sum({<Date = {">=$(=Max(Date)-30)<=$(=Max(Date)-1)"}>}Sales)

=Max(Date)-1 , if maximum date is today(), then its not considered today.

>= today() - 30

<= today()-1

Edit:

= sum({<system_name ={'ABC'}, Date = {">=$(=Max(Date)-30)<=$(=Max(Date)-1)"}> }factvalue)


hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

HI

Try with set analysis

= Sum({<Date = {">=$(=Max(Date)-30)<=$(=Max(Date)-1)"}>}Sales)

=Max(Date)-1 , if maximum date is today(), then its not considered today.

>= today() - 30

<= today()-1

Edit:

= sum({<system_name ={'ABC'}, Date = {">=$(=Max(Date)-30)<=$(=Max(Date)-1)"}> }factvalue)


hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
shree909
Partner - Specialist II
Partner - Specialist II
Author

That works  perfect..

Thanks