Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Shaunvijayan002
Contributor
Contributor

Need help in creating KPI for current month

Hello All, I am trying to create KPI for current month and below is the script I am using

Avg({<[end_Month]={"$(=monthname(Max(end_Month)))"},Type={'Events'}>}IN_MTTR)

I noticed that if I have data for say July-21 then it shows the data for July and if there is no data for July-21 then it shows the data for June-21

What is the command that I can use so that it can show be blank if there is no data for current month?

Regards

Shaun Vijayan

 

Labels (1)
1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Avg({<[end_Month]={"$(=monthname(addmonths(today(),-1)))"},Type={'Events'}>}IN_MTTR)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

You can change the expression like below.

Avg({<[end_Month]={"$(=monthname(today()))"},Type={'Events'}>}IN_MTTR)

Change Max(end_Month) to today().

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Shaunvijayan002
Contributor
Contributor
Author

Thanks Kaushik.

 

What would be the script for previous month?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Avg({<[end_Month]={"$(=monthname(addmonths(today(),-1)))"},Type={'Events'}>}IN_MTTR)

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!