Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
RubenMoreno
Contributor III
Contributor III

Create "Year-to-date" KPI

Hello,

 

I created a Measure in Qlik Sense and I am displaying its value on a weekly basis (please refer to the red line in the picture attached).

Additionally, I would like now to create a "year-to-date" KPI displaying the average of the weekly value of the Measure from beginning of the year till today. May I ask for support on how to create the new Measure/KPI?

Thank you in advance.

Best regards,
Rubén  

Labels (2)
1 Solution

Accepted Solutions
usamabinsadiq
Contributor III
Contributor III

Hi,

You can use this:

avg({<YEAR={$(=max(YEAR))}>} YOUR_MEASURE_NAME)

and if Year is not generated with load script then you can use following

avg({<Year(YourDateFeld)={$(=max(Year(YourDateFied)))}>} YOUR_MEASURE_NAME)

I hope this helps,

 

Regards, 

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.

View solution in original post

3 Replies
Wlad_Masi
Employee
Employee

@RubenMoreno  would Set Analysis resolve your problem?

Something like Avg({<Date>{'01/01/2020'}>}value)
This post also talks about this topic.

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
usamabinsadiq
Contributor III
Contributor III

Hi,

You can use this:

avg({<YEAR={$(=max(YEAR))}>} YOUR_MEASURE_NAME)

and if Year is not generated with load script then you can use following

avg({<Year(YourDateFeld)={$(=max(Year(YourDateFied)))}>} YOUR_MEASURE_NAME)

I hope this helps,

 

Regards, 

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.
usamabinsadiq
Contributor III
Contributor III

if my replay helped you then please do not forget to use the "Accept as Solution" button.

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.