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: 
ShaBeeN
Contributor III
Contributor III

Date Range

Guys, I have a file with data populating from 2018 onwards. It has a date (tran_date) field in '01/01/2018 01:31:23' format. My requirement is to select data only related to a certain month using set analysis. 

For example, I need get the list of data related to Jan'21 only. Using 'left(tran_date,10)' I was able to isolate the DD/MM/YYYY but I'm unable to select a date range.

Anyone can help?

Labels (1)
2 Solutions

Accepted Solutions
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Create a date field using left(tran_date,10) or using Timestamp#() function.

Write a set analysis like below to show data for particular range.

e.g for Current month start till today.

Sum({<Date = {">=$(Monthstart(Today))<=Today()"}>}Sales)

Reference help link : https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnal...

 

 

Thanks,
Ashutosh

View solution in original post

ShaBeeN
Contributor III
Contributor III
Author

Thank you so much. Let me try

View solution in original post

4 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Create a date field using left(tran_date,10) or using Timestamp#() function.

Write a set analysis like below to show data for particular range.

e.g for Current month start till today.

Sum({<Date = {">=$(Monthstart(Today))<=Today()"}>}Sales)

Reference help link : https://help.qlik.com/en-US/sense/August2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnal...

 

 

Thanks,
Ashutosh

ShaBeeN
Contributor III
Contributor III
Author

Thank you so much. Let me try

ShaBeeN
Contributor III
Contributor III
Author

I tried doing this but getting an error saying "Error in set modifier expression". Isn't it possible to use any functions inside a set analysis?

=COUNT({<(MID(TRAN_DATE,4,7))={"10/2021"}>}IP_ADDRESS)

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Create the Date dimension in script. i.e MID(TRAN_DATE,4,7) as Date.

And use that Date in Set Analysis. 

Like, COUNT({<Date={"10/2021"}>}IP_ADDRESS)