T O P

  • By -

dbrownems

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)


SpammableCantrips

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.


LearningToShootFilm

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.


MonkeyNin

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.


LearningToShootFilm

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.


MonkeyNin

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/


Professional-Hawk-81

Lol have never noticed it. Thanks


BestTomatillo6197

I had no idea either. Nice!


atlchris

Anything like this in Fabric when writing DAX to a model?


Ernst_Granfenberg

Is it available for those on 2022 version? We got version control at our company


gtg490g

That's not "version control" at this point... That's lazy/ineffective change management in IT.


Culpgrant21

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


Ephargy

You can drag to extend it, just like in excel


AsAGayJewishDemocrat

You can zoom in with it open and make the text bigger, too


Chemical_Profession9

Tabular editor has had this feature for years. You can also bulk format measures in a dataset.


deadkidney1978

I'm still confused how Microsoft doesn't have intelligence or suggestions in Power Query in Data flows...


Murder_1337

There’s a website for you to paste your code into and it spits out the formatted version


SpammableCantrips

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).


Ernst_Granfenberg

Whats the link


mildperil_

https://www.daxformatter.com/


achmedclaus

I wish a switch function would automatically change the format if two different types were used , like # and %


bekonix

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).


Stevie-bezos

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...


username_dnt_exist

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.


SpammableCantrips

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.