Ammar Noor El Din
Ammar Noor El Din

Reputation: 1

Extracting Month Label from a date column in power BI using direct query

I am struggling to switch the Month number (1=Jan , 2=Feb , ... ) column into Months label(Jan , Feb. , Mar,... ) . My main problem is that am using direct query which poses a lot of restrictions on the DAX functions that I found can help with i am trying to do. Functions like FORMAT or SWITCH aren't supported and i tried using the MID function( MonthName = MID("xxJanFebMarAprMayJunJulAugSepOctNovDec",'public patient'[Month/Year]*3,3) which gave me an OLE DB folding error where I need to use a simpler expression. I've been researching with no progress. Any help would be appreciated.

Upvotes: 0

Views: 1180

Answers (1)

Olly
Olly

Reputation: 7891

Your best option is to join the date column in your fact table to a Calendar dimension table, on field [date].

Your calendar table can contain all the Date aggregations and labels you need (e.g. Month Name)

Upvotes: 0

Related Questions