Forum Discussion
CMSINFO
7 years agoFrequent Visitor
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!
- 7 years ago
- 7 years ago
CMSINFO You can convert the date fields using FORMAT function. Try adding a new column as below
DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")
PattemManohar
7 years agoCommunity Champion
CMSINFO You can convert the date fields using FORMAT function. Try adding a new column as below
DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")
- CMSINFO7 years agoFrequent Visitor
Thanks! It worked however now the columns are in alphabetical order not on cronological order, how to sort it out?
- PattemManohar7 years agoCommunity 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
- CMSINFO7 years agoFrequent Visitor
It sorted the column in the Data but my report remains in alphabetical order, why?