Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
vgadang1
Partner - Contributor III
Partner - Contributor III

If statement in Data load editor

Hi,

 I do not have a date column to extract month, I have a month column that is 1 to 12. I have to convert this to Jan, Feb, Mar.... format and sort months from Oct through Sep (Fiscal yr) 

I used if statement in DLE

if(fy_month = 1, 'Jan', if(fy_month = 2, 'Feb', if(fy_month = 3, 'Mar', if(fy_month = 4, 'Apr', if(fy_month = 5, 'May', if(fy_month = 6, 'Jun', if(fy_month = 7, 'Jul',if(fy_month = 8, 'Aug',if(fy_month = 9, 'Sep',if(fy_month = 10, 'Oct',if(fy_month = 11, 'Nov', if(fy_month = 12, 'Dec',' ')))))))))))) as FY_MONTH

This kind of works, but I can only sort Alphabetically, how can I format this to "Month" and then sort it from Oct through Sept. 

Thank you,

Vidya

1 Reply
hic
Former Employee
Former Employee

Calendar years can be created through:
Month(MakeDate(2023,month_no)) as Month,

Fiscal months can be created through:
Dual(Month(MakeDate(2023,month_no)),Mod(month_no-10,12)+1) as FY_Month,