Forum Discussion
Month Columns in PBI Desktop
- 11 years ago
We're currently working on this for the desktop .... and it will be a unified experience in both the desktop and service. There are several date time features that will show up. This kind of automatic behavior is among the first that will arrive.
We're currently working on this for the desktop .... and it will be a unified experience in both the desktop and service. There are several date time features that will show up. This kind of automatic behavior is among the first that will arrive.
- apamau11 years agoNew Member
Yes, pls make it easier to auto detect or let us mark and easily inform the system this is month, year, a date or what ?
thanks and hope that's coming in fast.
- agraffeo2110 years agoHelper I
apamauwas this ever solved?
- Anonymous10 years agoNot applicable
I am too having this issue, surly it is a basic problem?
- dexterz9 years agoHelper II
Date =ADDCOLUMNS (
CALENDAR ( "2010-01-01", "2014-12-31" ),
"Year", FORMAT ( [Date], "YYYY" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"Month", FORMAT ( [Date], "MM" ),
"Month", FORMAT ( [Date], "MMM" ),
"Weekday", FORMAT ( [Date], "ddd" ),
"WeekdayNum", WEEKDAY ( [Date], 2 ),
"Day", FORMAT ( [Date], "dd" ),
"Cal-Month", FORMAT ( [Date], "YYYY-MM" ),
"Cal-Month", FORMAT ( [Date], "YYYY" ) & "-Q"
& FORMAT ( [Date], "Q" ))
- amysmith9 years agoHelper I
Hi, if you wish, you will be able to learn more here:
- Sean11 years agoCommunity Champion
Thanks! That would be great and would save us time when dealing with all date columns in a data model. Looking forward to it!
- starmoonknight10 years agoHelper II
Hi Lance,
I just found that if we create a new column that uses FORMAT to customise a Date type column, it is no longer of data type Date but Text.
The thing is that the provided formats for Date could not satisfy all needs, and if we use FORMAT, in the Report View, it'll be sorted alphabetically. It's more than better that we can customise the format but PBI still knows that it is a Date not a Text, so we can make use of the hierarchy and sort it in a meaningful way.
- mkorby10 years agoRegular Visitor
Great. Looking forward to getting this useful Power BI Online feature in Power BI Desktop.
- Anonymous9 years agoNot applicable
Any news on when this will be rolled out?
- EZgrafton9 years agoAdvocate II
I don't know if you found a solution for this, but if you didn't just follow these simple steps:
- create a table with the months / year
- assign a numerical order to them (1, 2, 3, etc.)
- link the month / year field on the newly created table to the month / year field on your original table
- sort the month / year field on your original table by the numerical order you created on 2
It should work. :)
- Haider1219 years agoFrequent Visitor
ITs now 2017 where is this solution? still cannot sort by chronolological test name month?
- teylyn9 years agoAdvocate III
You sound upset. It is possible to sort visualisations and tables properly, even if only the month name is being used.
Start in the query and add a custom column called DateSort with this M formula:
=Date.ToText([Date],"yyyyMM")
Replace [Date] with your desired date field. The new column will show the values like in this example. Note how the order is not chronological in the query.
Close and apply the query and go to to data tab and click the Modelling ribbon. Select the Month Name column, click the "Sort by Column" dropdown. Select the DateSort column you just created.
Now you can create data visualisations, charts or tables, where you use just the month name. If you sort by that month name, the result will be chronological, not alphabetical or only by month number. Not in the screenshot how February is at the bottom because it is a date in 2017, whereas all other dates are in 2016. For your benefit, another table shows the full date.
If that is not what you are trying to achieve, maybe you could politely explain your details.
- Haider1219 years agoFrequent Visitor
No I was frustrated earlier but thanks. Your solution is ok for data within powerBI but we run a SSAS tabular model from whichpowerBI reads the data from. In which case the sort by column drop down is greyed out and powerBI has no control of the data.
But its fine I found the option within SSAS properties of the data column where I can change the 'sort by column' and it works. Its just that this whole experience was not intuitive like any of the other BI platforms like qlikview or crystal. You have to look for the needle in a bunch of needles with powerBI.