Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jordanhertl
Contributor

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
Partner
Partner

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

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

jordanhertl
Contributor

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

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.

Partner
Partner

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

I've edited my previous messages; please try

jordanhertl
Contributor

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

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?