Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
adurgani
Contributor III
Contributor III

Current year + 2 quarters in dimension

Hello;

I am looking for help in creating an automated calculated dimension that uses today's dates to bring up the current 6 quarters  in a dimension:

7/24/2019 - 4 quarters of 2019 and 2 quarters of 2020

I need this in a dimension.

 

 

 

5 Replies
adurgani
Contributor III
Contributor III
Author

I have this and it works but it needs to be automated based on today's date to return current year quarters and next two quarters in next year:

=if(match([Fiscal Quarter],'Q1-2019','Q2-2019'......'Q2-2020'),[Fiscal Quarter])

dplr-rn
Partner - Master III
Partner - Master III

Do you have master calendar dimension like quarter year?
if so use that as dimension and use set analysis in your expression
e.g. below for last 6 quarters
Sum({<OrderDate={">=$(=quarterstart(AddMonths(today(),-18))) <=$(=today())"}>}LineSalesAmount)

this will give you data from 1st jan 2018 to today
adurgani
Contributor III
Contributor III
Author

That does work except that I'm trying to limit the quarters in a dimension not as a measure.

Is that possible?

We do have Fiscal Quarter as a calendar item.

dplr-rn
Partner - Master III
Partner - Master III

Thats the value of set analysis

if you limit the data being bought in using the measure the dimensions will automatically only show that.

e.g. in my example it will show only those quarters.

you can possibly do this through if statements on dimension etc. but it is not recommended practice as it will reduce performance. Set Analysis is the recommended route

 

adurgani
Contributor III
Contributor III
Author

Thanks! In this case it was a preference and a learning opportunity.