Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
h2k18
Contributor II
Contributor II

Previous Quarter based on date selected

Hi,

We have a Date selection object on a sheet. User can select only "single" date at any given time on the filter pane. We have a Text & image object which should reflect previous Quarter based on the date selected on the filter pane. 

Example1:

Date selected (Field Name = "Start Date") = "04/01/2018" (MM/DD/YYYY)

Previous Quarter should show  " 1st Quarter 2018"

Example2:

Date selected (Field Name = "Start Date") = "02/01/2018" (MM/DD/YYYY)

Previous Quarter should show  " 4th Quarter 2017"

Thanks,
H

Labels (2)
3 Replies
dplr-rn
Partner - Master III
Partner - Master III

Sure. You can do so using set analysis

Use something like below

Sum({<OrderDate={">=$(=quarterstart(AddYears(Max(OrderDate),-1))) <=$(=quarterend(AddYears(Max(OrderDate),-1)))"}>}LineSalesAmount)

h2k18
Contributor II
Contributor II
Author

Thanks for the response. It is not applicable here as no aggregation is required here. 

dplr-rn
Partner - Master III
Partner - Master III

What are you trying to display then? a single dimension?

Similar concept can be used but with only function instead of other aggregation functions