Comparison vs last month

Hello,

I want to create a table that compares my actual stock vs last month, but I do not want to display the data of last month, that is why periodOverPeriodPercentDifference() is not my option. I need a simple table as below.

Category Stock vs LM
Running +5%
Training -2%

Please, I hope you can guide me. Thank you very much

Hi @Castro

Could you please give the built-in period-over-period percent difference calculation a try for your table visual. Once you’ve added that field, simply hide the date column in the table visual so only Category and the % vs. Last Month show.

Example:

% vs LM = periodOverPeriodPercentDifference(
    sum({Stock}),
    {Date},
    1
)

Hi @Xclipse,

Thank you for your help. I did what you suggested, but when I hide the column of date I got two columns of % vs last month and one of them is empty. I attach the image.

Thank you,
Estefany

Hi @Castro

Is the same calculation used across the two columns, “Stk vs LM”?

Yes, it is. I created the calculated field Stk vs LM as shown below:

periodOverPeriodPercentDifference(sum({CANTIDAD STOCK}), FECHA, MONTH,1)

And then I create the pivot table.