Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys,
I want a KPI with the number of records from the previous month.
So I'm trying to do the following:
=count({$<Date_Year={'$(=year(vMaxData))'}, Date_Month={"=$(=addmonths(month(vMaxData),-1))"}>} Canal)
vMaxData is a variable I created as max date. And it is working because I use it in other calculations.
this way is not giving any error but the counting is not right.
Can you help me?
Best Regards,
Miguel Cunha
It worked now!
Thank you so much!
Best regards,
Miguel Cunha
Month() function returns a months in an MMM format, but his Date_Month format is MM here..
I saw that, but not sure... may be it is dual with string and number value...
you mean Month() is returning dual values ?
EDITED
just curious about the last one above, just test it and tell me please
no need to do this, I didn't saw the extra = on all the suggestions above...
I mean that Date_Month is a field created like this in the script
Month(Date) as Date_Month
Didn't work mate. It gave me the same result as when I had Date_Month={"=$(=addmonths(month(vMaxData),-1))"}
I see, i was focusing on the output described above (01 02 03..) indeed, Month() return dual values.. but don't know it depends on what it displays a month name or an integer as an output..
Month() will display text and Num(Month()) will display number..... unless the environmental variable has been changed to show number also....
so here op's environnement variables is changed ? because when he put it on listbox, it displays 01 02, and when yo use your expression with Month(Addmo... it works..
so what's your thought here ?