Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
erprabu03
Contributor
Contributor

How to filter the data from the table based on the date?

Hi All, Please help on the below query on Qlik Sense Sheet.

I am creating a data visuals and I have created a table which include the purchasing data (already loaded from SAP). Now the table showing all the data since 2015, but I am interested to visualize  only 2020 & 2021 data.

Please suggest which function or formula helps to filter the data based on specific date.

Example Date format: 11/25/2014 12:00:00 AM.

 

#Filter

Labels (1)
3 Replies
vinieme12
Champion III
Champion III

Refer this

https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511

1) Remove the time part from your date field and keep only the date, 

2) Create a master calendar associated to your date field

https://qlikviewcookbook.com/2015/05/better-calendar-scripts/

3) in your expressions you can then refer to the year,month , date fields in your set analysis

sum({<Year={"2020"}>}) or sum({<Year={"2020"},Month={1,2,3}>})  or sum({<Date={">=01/01/2020<=01/10/2020"}>})

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
erprabu03
Contributor
Contributor
Author

Thank for the reply.

I am having access to create visualization only (Sheet view) and not having the access for app. Also, data is directly pulled from SAP table.

Any suggestions.

 

vinieme12
Champion III
Champion III

try

sum({<Date={"=$(Date(Max(YourDateField),'MM/DD/YYYY 12:00:00'))">}  YourMeasureField)

or 

sum({<Date={">==$(Date(Monthstart(Max(YourDateField)),'MM/DD/YYYY 12:00:00'))<=$(Date(Max(YourDateField),'MM/DD/YYYY 12:00:00'))">} YourMeasureField)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.