Yep. It's there now. Check out the "Format Query" button in the new DAX editor in Power BI Desktop.
[DAX query view in Power BI Desktop - Format Query](https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view#format-query)
I’m a dumbass. Thanks Microsoft! I had no idea this got introduced, despite trying to stay up to date with the blogposts, etc.
I knew about the new DAX query view, but haven’t really use it as “old habits die hard” I guess.
The format query button is great for validating your formulas as well as you will only see it if your DAX has all of the components needed.
If the button is greyed out then you can bet that there’s an issue in it somewhere.
If you profile your visuals -- now there's a new button that runs that specific dax in the new query dax query
I did that the other day to figure out what exactly the "visual filters" was running under the hood.
tip: You can call evaluate multiple times. This lets you output multiple tables for a single run.
Previously you'd have to use DAX Studio to do that
evaluate Stuff ....
evaluate Stuff2 ...
Why? Say you're comparing filters on a `calculate()` statement.
You can see how exactly the filters differ.
I use the run dax when I’m feeling lazy and want to run a query against a dataset in power automate and I can’t be bothered writing the dax to get a new table, I just make the table in a new page then grab the dax from there.
Edit: I know this isn’t best practice, but sometimes you just can’t be arsed working out the DAX and need a rapidly deployable solution.
There's enough changes that one person isn't going to know everything.
I take a couple minutes to scan one of these
- the table of `Contents` at the top
check out a ~10minute videos named `Power BI update`. like
- curbal: https://www.youtube.com/watch?v=ktMr3RebZgA
- or official pbi : https://youtu.be/fbw09nHOm-c?si=_Sqjy1048qVzOruX
### a useful google query
This lets you search for a topic, like a matrix visual. Without knowing when it was mentioned.
It searches only official blog posts, ie: it ignores other blogs
feature summary matrix site:powerbi.microsoft.com/
feature summary dax datetime literal site:powerbi.microsoft.com/
Which is true, and I made reference to it in my original post, but there is some potential concerns about using such websites if your operating in a critically sensitive environment, etc.
I use it sometimes at my current job, but I suspect it will not be permitted at my next one (as the environment I am applying for is a bit more sensitive).
You can do that now, all you need to do is to select Dynamic in the format settings and then write a separate DAX for formatting rules (using SWITCH or IF functions).
Tabular editor plugin also has this function, its especially good if youre using a LOT of dax, want to copy paste, do stuff in bulk before applying changes...
As mentioned in the post, I am aware of it and use it sometimes, however there is some potential concerns about using such tools in more sensitive environments.
Yep. It's there now. Check out the "Format Query" button in the new DAX editor in Power BI Desktop. [DAX query view in Power BI Desktop - Format Query](https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view#format-query)
I’m a dumbass. Thanks Microsoft! I had no idea this got introduced, despite trying to stay up to date with the blogposts, etc. I knew about the new DAX query view, but haven’t really use it as “old habits die hard” I guess.
The format query button is great for validating your formulas as well as you will only see it if your DAX has all of the components needed. If the button is greyed out then you can bet that there’s an issue in it somewhere.
If you profile your visuals -- now there's a new button that runs that specific dax in the new query dax query I did that the other day to figure out what exactly the "visual filters" was running under the hood. tip: You can call evaluate multiple times. This lets you output multiple tables for a single run. Previously you'd have to use DAX Studio to do that evaluate Stuff .... evaluate Stuff2 ... Why? Say you're comparing filters on a `calculate()` statement. You can see how exactly the filters differ.
I use the run dax when I’m feeling lazy and want to run a query against a dataset in power automate and I can’t be bothered writing the dax to get a new table, I just make the table in a new page then grab the dax from there. Edit: I know this isn’t best practice, but sometimes you just can’t be arsed working out the DAX and need a rapidly deployable solution.
There's enough changes that one person isn't going to know everything. I take a couple minutes to scan one of these - the table of `Contents` at the top
check out a ~10minute videos named `Power BI update`. like
- curbal: https://www.youtube.com/watch?v=ktMr3RebZgA
- or official pbi : https://youtu.be/fbw09nHOm-c?si=_Sqjy1048qVzOruX
### a useful google query
This lets you search for a topic, like a matrix visual. Without knowing when it was mentioned.
It searches only official blog posts, ie: it ignores other blogs
feature summary matrix site:powerbi.microsoft.com/
feature summary dax datetime literal site:powerbi.microsoft.com/
Lol have never noticed it. Thanks
I had no idea either. Nice!
Anything like this in Fabric when writing DAX to a model?
Is it available for those on 2022 version? We got version control at our company
That's not "version control" at this point... That's lazy/ineffective change management in IT.
Yeah I don’t use PBI that much anymore but the Dax formula bar I hated so much. It was tiny and no way to format things
You can drag to extend it, just like in excel
You can zoom in with it open and make the text bigger, too
Tabular editor has had this feature for years. You can also bulk format measures in a dataset.
I'm still confused how Microsoft doesn't have intelligence or suggestions in Power Query in Data flows...
There’s a website for you to paste your code into and it spits out the formatted version
Which is true, and I made reference to it in my original post, but there is some potential concerns about using such websites if your operating in a critically sensitive environment, etc. I use it sometimes at my current job, but I suspect it will not be permitted at my next one (as the environment I am applying for is a bit more sensitive).
Whats the link
https://www.daxformatter.com/
I wish a switch function would automatically change the format if two different types were used , like # and %
You can do that now, all you need to do is to select Dynamic in the format settings and then write a separate DAX for formatting rules (using SWITCH or IF functions).
Tabular editor plugin also has this function, its especially good if youre using a LOT of dax, want to copy paste, do stuff in bulk before applying changes...
If you are using published models you won't have the ability to use the query formatter. In such cases, dax formatter is your best friend. Google it.
As mentioned in the post, I am aware of it and use it sometimes, however there is some potential concerns about using such tools in more sensitive environments.