Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have month field values as Jan, Feb, Mar...
When i calculate max of month it gives me numbers like 12,11,10..etc How can i get month names instead of these numbers like Dec, Nove, Oct...etc
Use MaxString()
Use MaxString()
when I do Maxstring(Month) - 1 again it gives number as '11' instead of Nov..how can we handle that as we have to show trend of last 12 month with names
Are you trying it with a chart? Could you post a sample? I guess you don't have to subtract one after another from month to achieve this. there would be a simpler way.
I am doing it in a chart in which i dont have dimension..I have 12 separate expressions as per our data
Then for second highest month try like: =Month(MakeDate(1,Max(Month)-1,1))
Or if you have a date field you could try: =Month(AddMonths(Max(Date),-1))
Hi Tresesco,
I'm using maxstring function in my pick expression, and it doesn't work.
Could you please give me some advise?
Variable:
vCurrentMonth = MaxString(Month)
vLastMonth = Month(MakeDate(1,Max(Month)-1,1))
Expression:
pick(Dim,
sum({<rpt_type = {'Actual'}>}pdc_profit_all),
sum({<Month = {$(=$(vCurrentMonth))},rpt_type = {'Actual'}>}pdc_profit_all) - sum({<Month = {$(=$(vLastMonth))},rpt_type = {'Actual'}>}pdc_profit_all)
)
Try like:
vCurrentMonth = Month(MakeDate(1,Max(Month)))
Hi Tresesco,
It shows the value when I use the MaxString function, but It doesn't work when I use the expression as you mentioned.
Kate
In a variable try this will find the Max value in the Month Field
vCurrentMonth = Month( {1} MakeDate(1,Max( {1} Month)))