Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hii All,
I am creating a line chart,using date column for dimension and sum of revenue for expression.
whenever i should select a date i should see data for the last 30 days
I am using this set analysis sum({<Month=,Date={'>=$(=thirty_day)) & <=$(=select_day)'}>}Revenue)
where select_day and thirty_day are variables and gives the selected day and 30th day from the selected date respectively
this is not working for me, I am attaching a image of what I am looking for
Thanks in Advance !
Hi Amrit
You might need to add 1 into the set analysis to select from the entire dataset. The issue with Aruna's response is it works from the most recent date in the data as a point of reference. When nothing is placed in the start of the set analysis Qlik works on the current selections, this can be represented with a $ where I have added the 1. Putting in the Month= will make it ignore a selection of month but your selection is in the date field, and you can't ignore that in the same way.
So:
sum({1<Date={'>=$(=thirty_day)) & <=$(=select_day)'}>}Revenue)
May be this?
Hope your format for Date and variables is same.
sum({<Month=,Date={">=$(=thirty_day)<=$(=select_day)"}>}Revenue)
HI,
Try below
=sum({<Date={">=$(=Date(Max(Date)-29)) <=$(=Max(Date(Date)))"}>}Sales)
I assume your Date field is in your actual Date format. It will not work to compare a day with date. Follow Aruna's expression else share your variable expression you have.
Hi Amrit
You might need to add 1 into the set analysis to select from the entire dataset. The issue with Aruna's response is it works from the most recent date in the data as a point of reference. When nothing is placed in the start of the set analysis Qlik works on the current selections, this can be represented with a $ where I have added the 1. Putting in the Month= will make it ignore a selection of month but your selection is in the date field, and you can't ignore that in the same way.
So:
sum({1<Date={'>=$(=thirty_day)) & <=$(=select_day)'}>}Revenue)
Thanks !