Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sanketkhunte
Creator II
Creator II

FROM Date - To Date filter without Variable

Hi Team,

In dashboard, there is frequently requirement of filtering data with selecting START DATE AND END DATE filter. (from date and to date).

I have achieved this functionality by using variables and SET ANALYSIS function. Here I would like to ask : Can we implement this functionality without using variables.

Thank you in advance.

Regards

Sanket

1 Solution

Accepted Solutions
Anonymous
Not applicable


Hi,


first of all there is no problem in using variable in your application, but anyway if you do not desire

then you have to use some other functionality available in qlikview to acheve the same

just look below the example you may require to declare variables globally but this scenario is done

without using variable


Question :  We have the create_date for a CI . It expires after 36 months from create_date. How do I calculate the count of CIs that expires in the next 30 days?

ans.



lOAD

*,

AddMonths(DateDimension, 36) AS ExpiryDate

FROM DataSource;

Now use this expression to get the count of CIs that expires in the next 30 days

Count({<ExpiryDate={'>=$(=Today())<=$(Date(Today() + 30))'}>} CI)

anant

View solution in original post

6 Replies
sujeetsingh
Master III
Master III

Just seems not feasible .

How can you make any expression or calculation dynamic without any parameter or variable.

But yes one thing you can do is that provide to filters as

-----Date From (it consist of all dates )

-----Date To (it consist all date s too)

Now you can call the selection of these two filters to limit your expression by using call function

GetFieldSelection()

Hope it helps you .

Anonymous
Not applicable


Hi,


first of all there is no problem in using variable in your application, but anyway if you do not desire

then you have to use some other functionality available in qlikview to acheve the same

just look below the example you may require to declare variables globally but this scenario is done

without using variable


Question :  We have the create_date for a CI . It expires after 36 months from create_date. How do I calculate the count of CIs that expires in the next 30 days?

ans.



lOAD

*,

AddMonths(DateDimension, 36) AS ExpiryDate

FROM DataSource;

Now use this expression to get the count of CIs that expires in the next 30 days

Count({<ExpiryDate={'>=$(=Today())<=$(Date(Today() + 30))'}>} CI)

anant

jagan
Luminary Alumni
Luminary Alumni

Hi,

If you don't to use variables, then provide List box with dates and ask user to select From and To dates from 2 list boxes, then based on the selection write set analysis expression to filter those values.

Regards,

Jagan.

sanketkhunte
Creator II
Creator II
Author

Thanks Jagan

sanketkhunte
Creator II
Creator II
Author

Thank you Anant

Anonymous
Not applicable

Alternate states will also help you out in this scenario.

Create two list box with all dates .

and provide different alternate states to both list boxes respectively,

you can play with set analysis based on it.....

this will remove the need of defining variable......