Forum Discussion
Date Format
Hi, I am new to Power BI, can anyone tell me how to add dates in the format JAN17, FEB17,MAR17? I don't see this format on Modeling -> Format.
Thanks!
CMSINFO You can convert the date fields using FORMAT function. Try adding a new column as below
DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")
8 Replies
- ChrisMendozaResident Rockstar
- PattemManoharCommunity Champion
CMSINFO You can convert the date fields using FORMAT function. Try adding a new column as below
DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")
- CMSINFOFrequent Visitor
Thanks! It worked however now the columns are in alphabetical order not on cronological order, how to sort it out?
- PattemManoharCommunity Champion
CMSINFO Add an another new column (if table doesn't have one as below) and call it as SortKey
SortKey = FORMAT(Table[DateColumn],"YYYYMM")
Select the field that you want to sort on (in this case it is the field that you have created earlier i.e. MMMYY format) then click on "Sort By Column" option under "Modelling" tab use SortKey field