Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I got he following case:
Loading a monthly inventory of materials like this:
MATERIAL - Name of the Material
VALUE - The value of the Material
EJERCICIO - The month in number (1-12) of the inventory
PERIODO - The year in number (2022) of the inventory
In the load script, I created other variables to convert these to dates:
MonthName(EJERCICIO & '-' & PERIODO & '-01') AS MESYY,
Month(EJERCICIO & '-' & PERIODO & '-01') AS MES,
Date#('01/' & PERIODO & '/' & EJERCICIO ) AS FECHAMES,
We need to get the change in percentage of the value of the inventory the current month vs the prior month.
I have tried several tricks but to no avail.
Any suggestions?
Try Before() instead of Above().
You write that EJERCICIO is the month and the PERIODO is the year. Isn't it the other way around?
If PERIODO is the month and the EJERCICIO is the year, you should in the script have
Date(MakeDate(EJERCICIO,PERIODO),'YYYY-MM') as MESYY
and in a chart you should have
Dimension 1: MATERIAL
Dimensions 2: MESYY
Measure: Sum(VALUE) / Above(Sum(VALUE)) - 1
You are right, I misplaced the names of year and month. The right ones are:
PERIODO - The month in number (1-12) of the inventory
EJERCICIO- The year in number (2022) of the inventory
This works ONLY if the "Month" Dimension goes vertically, so that the value for the prior month is -as you expect- above the value for the current month.
That is not our case. We want to deply the values month by month in a horizontal line.
But we need this:
Any ideas?? THANKS!
Try Before() instead of Above().
That one did the trick!!
Thanks a lot.
Have a nice one.
René.