Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Creator III
Creator III

Calculate YOY and MOM in qliksense

Hello All,

I have below data set:-

Aspiring_Developer_0-1660135025711.png

I need to achieve below :-

1) Calculate YOY

2) Calculate MOM

I have also given filter for Month and Year to user. So, if the user is selecting April2022 then :-

--> YOY % should be for Apr 2021- Apr 2022

-->? MOM % should be for Apr 2022- Mar-2022

How can I achieve this ? Can anyone please help ?

Thanks in advance

@hic 

Labels (1)
3 Replies
Aspiring_Developer
Creator III
Creator III
Author

Hello All,

I was able to calculate MOM and it works fine on Month Filter as well :-

1) MOM measure 

(Sum({$<Brand= {'Plusnet'}, MonthYear={"$(=Date(Max(MonthYear), 'MMM-YYYY'))"}>} Value)
/
Sum({$<Brand= {'Plusnet'}, MonthYear={"$(=Date(AddMonths(Max(MonthYear), -1), 'MMM-YYYY'))"}>} Value)) -1

Not sure, How to calculate YOY and It should be in sync with Month year filter.

Like if we select Apr 2021 then YOY % should show data for apr 2020 and apr 2021.

Can anyone please help me on this ?

Thanks in advance

Aspiring_Developer
Creator III
Creator III
Author

Can anyone please help me on this ?

 

sidhiq91
Specialist II
Specialist II

@Aspiring_Developer  for YOY also you can follow logic that you have followed for MOM:

(Sum({$<Brand= {'Plusnet'}, MonthYear={"$(=Date(Max(MonthYear), 'MMM-YYYY'))"}>} Value)
/
Sum({$<Brand= {'Plusnet'}, MonthYear={"$(=Date(Addyears(Max(MonthYear),-1),'MMM-YYYY'))"}>} Value)) -1

This should resolve your issue, if it did please like and accept it as a solution.