Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey lads,
i'm in a roadblock with the following thing.
I want to make an analysis of the same data as of today, month -1 and year -1.
The data has columns Year = 2017,2018.... and Month =1,2,3,.....
What i was thinking of doing is to create those variables
vCurrentMonth=month(today())
vPreviousMonth=month(today())-1
vCurrentYear=year(today))
vCurrentYear=year(today))-1
And respectfully use the logic
Current month = sum({$<[Month]={vCurrentMonth},[Year]={vCurrentYear}>}[ThingToSum])
Previous month = sum({$<[Month]={vPreviousMonth},[Year]={vCurrentYear}>}[ThingToSum])
Previous year = sum({$<[Year]={vPreviousYear},[Month]={vCurrentMonth}>}[ThingToSum])
Naturally, it aint working 🙂
Any tips?
Thx!
Try expanding your variables with $ like:
sum({$<[Month]={$(vCurrentMonth)},[Year]={$(vCurrentYear)}>}[ThingToSum])
for some reason it does not work with the variables.
I've tested the variables in text boxes and they provide the accurate figures for the month number and year number, but when part of the expression they give 0. If i type manually the number of the month, it all works fine