Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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
Partner - Champion
Partner - Champion

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

angelfer90
Contributor
Contributor
Author

It displays the formula as incorrect.

agigliotti
Partner - Champion
Partner - Champion

Yes, a bracket was missing...

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

Best Regards

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.