Forum Discussion
Anonymous
4 years agoNot applicable
sorting by month (text)
ssas tabular model - I have a month column, which is a text datatype, and is based on a day column which is date datatype I have a power bi report doing live connection to this model, when I try ...
- 4 years ago
Anonymous Your calculation should be:
=YEAR([xxx Day]) * 100 + MONTH([xxx Day])
Set this as your Sort By column of your text month name.
Anonymous
4 years agoNot applicable
Greg_Deckler why multiply by 100
Greg_Deckler
4 years agoCommunity Champion
Anonymous It gives you the 0 for single digit months. 2022 * 100 = 202200 + your month number results in 202201, 202202, 202203, 202204, 202205, 202206, 202207, 202208, 202209, 202210, 202211, 202212 and thus this provides a consistent sorting by year and month.