Month Labels in PowerBI Direct Query Mode

Month label columns are invaluable for things like slicers and report axis. When users see 9 then don’t immediately get that you’re talking about September, but put a “Sep” on that slicer and things snap into focus pretty quick. But kinda like Indiana Jones reaching for his gun to find it not there, when you go to use FORMAT() to do this in Direct Query mode you’re greeted with a none too friendly warning that you’ve written code that DQ doesn’t understand and you need to rewrite it.

With what though? That’s your go-to function for this job; if it doesn’t work is there any hope of not having to contact your DBA and sheepishly ask for them to queue up adding a custom column at their earliest convenience”? With a little cleverness and some elementary math we can use the MID() function to get just what we need; in this video we’ll get you hip to the solution and if you’re like me it’ll leave a big grin on your face for just how simple it is.

Brian Grant

Brian Grant

Brian Grant is a masterful Senior Analytics Consultant by day, and a Power BI legend by night. A passion for Power BI drove him to holistically master the tool from all three perspectives: M, DAX, and the visualization layer. Brian is a constant teacher who leads Power BI training sessions, while sharing his wealth of expertise through video and blogging resources.
SHARE THIS
Share on twitter
Share on facebook
Share on linkedin
Share on email
RELATED POSTS

Subscribe

Subscribe to CSG. We’ll supply your inbox with the latest blog posts, training videos, and upcoming events.

Ready to wrangle your data?