How to add month over month percentage difference in Pivot table when the table sorted

Hi Team,

We wanted to add month over month difference when the Pivot table is sorted and filtered to showup only top level cost.

For Example we wanted to see the data in below format

Account-Name Jan-23 Feb 23 Month-over-month-Difference %
John 100 120 20%
Babu 80 70 -12.5%

Have you used periodOverperiodDifference?

Or are you saying there could be a difference of multiple months?

In that case I would look to use a lag function.

Something like this where you substitute your values / aggregations in.

(count({session_id})-lag(count({session_id}),[truncDate(‘MM’,{arrival_timestamp}) ASC],1,[{client_id[users]}]))/(count({session_id}))

hi johnson.vb,

We hope Max’s solution worked for you. Let us know if this is resolved. And if it is, please help the community by marking his answer as a “Solution.

kind regards,

1 Like