Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!
Solved! Go to Solution.
@CMSINFO -
As a calculated column you can format the date as:
Column = FORMAT(Table1[Date],"MMMYY")
Proud to be a Super User!
@CMSINFO You can convert the date fields using FORMAT function. Try adding a new column as below
DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")
Proud to be a PBI Community Champion
@CMSINFO You can convert the date fields using FORMAT function. Try adding a new column as below
DateMMMYY = FORMAT(TableName[DateColumn],"MMMYY")
Proud to be a PBI Community Champion
Thanks! It worked however now the columns are in alphabetical order not on cronological order, how to sort it out?
@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
Proud to be a PBI Community Champion
It sorted the column in the Data but my report remains in alphabetical order, why?
@CMSINFO For your reference...
Proud to be a PBI Community Champion
The months on my matrix still in alphabetical order...
@CMSINFO -
Is your calculated column [MMMYY] in the 'Date' Table (a proper date table) and the fact table with measures/etc. related to that 'Date' Table? Or are you trying to do all this within the fact table?
I'm guessing you need to share more of your model cause what's been suggested should work.
Fact Table
Proud to be a Super User!
@CMSINFO -
As a calculated column you can format the date as:
Column = FORMAT(Table1[Date],"MMMYY")
Proud to be a Super User!
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |