Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I'm trying to format a GetFieldSelections(Month) to a number (i.e. Jan = 1, Feb = 2, etc.).
When I try date#(GetFieldSelections(Month), 'MMM') I get the month, great, this is what I want... As soon as I try to do num(date#(GetFieldSelections(Month), 'MMM')) it gives me a number like -363 when I select January.
What am I doing wrong?
Thanks!
Joe
try
=Num(Month(date#(GetFieldSelections(Month),'MMM')))
You're the man!
Thank you!
Joe
Hi Joe,
You could try something like this:
=Num(Date#(GetFieldSelections(Month)&'-'&Year(today()), 'MMM-YYYY'))
It seems that when you convert to day using only the month, Qlik doesn't have enough information and set current data as 1st of month and year something like 1899 (Try to apply Date for to your current expression).
Hope it helps.
-- Karla