Sort Month Text in multiple year

In Power BI, in some specific contexts I wish I could make a report using trend chart showing values over 12 months, from jan to dec and comparing the trend of more years at the same time.

However, it’s impossible sort data by two helper column (monthsort) as there are more distinct values in the sort column than the result column.

The solution is very easy:

You can create a new column called “DateSort”  and use following DAX formula:

=FORMAT([Date],”YYYYMM”)

Select your data column and choose “Sort by Column” and set it to “DateSort” column.

Annunci

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...