Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a question I hope someone would be able to help me with. I have a column which displays date in varying formats: some are 'DDMMYYYY', some are 'MMDDYYY', some 'YYYYMMDD' and so on and so forth. Is there perhaps a command that would count all the distinct date formats and then report a count for each? I suppose something along the lines of Count(if(.....) as expression and Count distinct as dimensions in a chart, but I can't figure out a precise format.
Thank you all so much!
Hi,
You need to look at Alt() function
alt(date#(DateString, 'YYYY-MM-DD'), date#(DateString, 'DD-MM-YYYY'), date#(DateString, 'DD/MM/YYYY'), 'No Date Found') AS Date
Replace it with your required format.
http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/25/which-conditional-functions-do-you-use
Regards
ASHFAQ
Hi,
You need to look at Alt() function
alt(date#(DateString, 'YYYY-MM-DD'), date#(DateString, 'DD-MM-YYYY'), date#(DateString, 'DD/MM/YYYY'), 'No Date Found') AS Date
Replace it with your required format.
http://community.qlik.com/blogs/qlikviewdesignblog/2014/04/25/which-conditional-functions-do-you-use
Regards
ASHFAQ
Thank you so much! You've been very helpful!
Welcome