Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Partner - Creator III
Partner - Creator III

Dynamic MOM Calculation in Pivot table Qlik Sense

Hai all,

My requirement is to get MOM in Pivot table like below image. 

Capture.JPG

 

2018-Apr MOM should be 2018-Apr vs 2018-mar (252-42=210)

2018-Mar MOM Should be 2018-mar Vs 2018-Feb(42-176 = - 134)

 

Thanks !!!

2 Replies
bharathadde
Creator II
Creator II

Please find below attachments for Solution

I used below as my sample data to create the Pivot table

MOM:
Load * inline [
Product,YearMonth,Sales
A,2018-Jan,746
A,2018-Feb,176
A,2018-Mar,42
A,2018-Apr,252
B,2018-Jan,442
B,2018-Feb,70
B,2018-Mar,57
B,2018-Apr,19
C,2018-Jan,322
C,2018-Feb,337
C,2018-Mar,385
C,2018-Apr,112
D,2018-Jan,182
D,2018-Feb,400
D,2018-Mar,372
D,2018-Apr,278
];

1st Dimension as --> Product

2nd Dimension as  --> MonthYear

1st Expression as --> =Sum(Sales) which is labeled as Sales

2nd Expression as --> =Sum(Sales)-above(Sales)

Hope this helps you

 

UserID2626
Partner - Creator III
Partner - Creator III
Author

Hi @bharathadde 

In my requirement Yearmonth is used as column.

 

Thanks 🙂