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

Announcements
Meet Qlik's New CEO. The Future Is Bright — Here's What to Expect
cancel
Showing results for 
Search instead for 
Did you mean: 
angelfer90
Contributor
Contributor

YoY KPIS

Hi everybody,

 

I´m trying to create a YoY KPI with this formula.

=SUM( {< Year = {$(=Max(TOTAL Year)-1)} , Month_Name = {"*"} >} KF_Units_invoiced_net)

 

The problem is that this formula is taking me all the months from the previous year, when I want just the months available in the currrent year.

 

Which is the correct formula to get only the months which are available in the forward year of the previous year?

 

Thank you in advance.

 

Labels (1)
4 Replies
agigliotti
MVP
MVP

Hi @angelfer90 ,

Let's try the below expression:

=SUM( {< Year = {"$(=Max(Year)-1)"}, Month = {"<$(=if( Month(Today())=1, 13, Month(Today()))"} >} KF_Units_invoiced_net )

I hope it can helps.

Best Regards

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
angelfer90
Contributor
Contributor
Author

It displays the formula as incorrect.

agigliotti
MVP
MVP

Yes, a bracket was missing...

=SUM( {< Year = {"$(=Max(Year)-1)"}, Month = {"<$(=if( Month(Today())=1, 13, Month(Today())))"} >} KF_Units_invoiced_net )

Best Regards

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
angelfer90
Contributor
Contributor
Author

I finally success with this formula:

=NUM(SUM( {< Year = {$(=Max(TOTAL Year)-1)} , Month = {"<=$(vMaxMes)"} , Month_Name = {"*"} >} KF_Orders_Units_created),'#.##0')

Introducing vMaxMes as a variables getting the max month of availables.