Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
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
dilipranjith
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)

h2k18
Contributor II
Contributor II
Author

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

dilipranjith
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