Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

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 (1)
3 Replies
Highlighted
Partner
Partner

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)

Highlighted
Contributor
Contributor

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

Highlighted
Partner
Partner

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

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