Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is there any way to get data to auto update - to use the current quarter?

I have some KPI's

Avg({<[Admin_Qtr]={"Q3 2018"}>}[TOPIC_2])

Instead of having to change the syntax every quarter to Q4 2018, Q1 2019, Q2 2019, etc...every quarter. Is there any way to have Qlik use the most recent automatically?

4 Replies
OmarBenSalem

do u have a date fielD? month?

if u have a date field,

do as follow:

sum({<Quarter=p({<date={"$(=max(date))"}>}Quarter)>}Sales)

or

sum({<Quarter=p({<date={"$(=date(today(1)))"}>}Quarter)>}Sales)


Example: IF my max (date) was 01/04/2018 and it's associated to Quarter 2018)

Capture.PNG

Anonymous
Not applicable
Author

I do yes. I have the Quarter variable. I also have a date id (when people took the survey). So like 09/29/2018 - that format.

OmarBenSalem

I've edited my previous messages; please try

Anonymous
Not applicable
Author

Ok, I think I understand what the max date is judged on. But how does the beginning of the quarter get calculated? I see how it knows when the quarter ends, but not sure how it knows when it begins?