I need to generate a variation percentage month over month inside a Bar/Line View, this variation should be functional for a metric existing in DataManager [Clicks] and also for a metric calculated inside the the same graphic (CTR).
We have tried with "subset_sum" and "subset_mean" but it is not possible to do the calculation. Can you please help me with this?
Is the subset_sum function being used correctly? I don't think SUBSET_SUM([Month] ="Febrero") actually works, as you can't sum a category or date field.
Normally it is the quantity value first then the defined subset i.e.
SUBSET_SUM( [Likes] , SUBSET([Month] , "Febrero") - to get the sum of all the likes in that month.
Not stating a month will give you the calculation for the month of that current row if you are using it as a new field. Otherwise in content view it should just be:
I'm not sure if the function will accept the -1 on month.
I haven't tested the functions so I'm not sure if that works, alternatively you can explore using aggregations operations in the DM to calculate those monthly values for you and treat it as a separate data source for monthly figures.
I'll try to do a demo for this on Monday if I get the time.