Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have written the following code to get month in script
Date(Makedate((LEFT(Period,4)),(Right(Period,2)),01),'MMM') as Month
But i am getting repetitive months. like Jan,feb..dec again jan,,feb..dec
Can you please help me how to remove those.
Hi Bharat,
could you please post an example and the result you want to have?
If you just need to derive month from date field you can use month(date#(Perion,'date_format')). https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...
BR,
Maria
to look more Share values of Period Field.
Please provide samples of your raw data field "Period".
You can create a master calendar and link this field with calendar month and then show that calendar month n your listbox.
You are getting multiple months because due to makedate different months are created for different records in your table Equipments_Details_final_12_Monoplane.
PS Your qvw file was not having any data, couldn't check the exact figures.
Of course you get repetitive values, because those are different dates formated to similar format. Based on your script both 201801 and 201701 (and so on) will result in Jan, but they are different dates.
If you only want to have month value, then you can create master calendar table as suggested, or use
Month(Makedate((LEFT(Period,4)),(Right(Period,2)),01)) as Month