Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I was adding a custom column for doing some text manipulations based on values in an existing date column. I realised that DAX functions aren't recognised in Power Query Editor, so I had to write it in the Data View.
Apart from the language restrictions, what are the best practices on when to use PQE vs DV?
My report contains multiple queries and large data, so I want to use all tips to make the data refreshes as quick as possible.
In my requirement, what is a more efficient way - writing in DAX language in DV; or, writing in M language in PQE?
Solved! Go to Solution.
Yeah, honestly this might be one of those exceptions where it is better/faster/easier to just use DAX. Switch statements in PQ are a pain but can be done: https://www.thebiccountant.com/2018/02/15/generic-switch-function-query-editor-in-power-bi-and-power...
Refer : Both M and Dax witch in
Refer :
https://radacad.com/m-or-dax-that-is-the-question
https://stackoverflow.com/questions/39632894/whats-the-difference-between-dax-and-power-query-or-m
Well, like most things, it depends. But the general rule is that the further "upstream" that you can push the creation of custom columns the better. So that is M and PQ. But, there are lots of caveats and exceptions to that rule, would need to better understand your requirements.
Thanks @Greg_Deckler
The requirement: Extract the month number from a date column. Then, assign a text based on the month number.
I used this in PQE
SWITCH(Date.Month([Download Date]),1,"Q2",2,"Q2",3,"Q3",4,"Q3",5,"Q3",6,"Q4",7,"Q4",8,"Q4",9,"Q1",10,"Q1",11,"Q1",12,"Q2","Unknown Month")
While the 'Date.Month([Download Date])' worked, the 'SWITCH' gave an error.
Yeah, honestly this might be one of those exceptions where it is better/faster/easier to just use DAX. Switch statements in PQ are a pain but can be done: https://www.thebiccountant.com/2018/02/15/generic-switch-function-query-editor-in-power-bi-and-power...
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |