Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

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 (2)
2 Solutions

Accepted Solutions
AshutoshBhumkar
Partner
Partner

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
Partner

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
Partner

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)