Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mkjit256
Advocate II
Advocate II

Is there a visual that can display formatted Dax Measure Expressions

Hello,

I am trying to build a report that display the measure dax code that i have written in other reports. I am able to get the text of the  measure expressions from a power bi template file. What i am looking for is to see if there is any custom visual that can display the dax measures in a good looking format?

Till now i am visualizing the measure's text in a column in a table visual, but it is so difficult to read.

3 REPLIES 3
lbendlin
Super User
Super User

you can call the DAXFormatter.com API.

Thanks for your reply,

can you please elaborate a little bit more?

What i understood is that you are suggesting that i call the Daxformatter api, to generate a new formatted column out of my raw dax measure, right?

Trying to invoke that column but getting the following error:

mkjit256_0-1683116270626.png

 

 

You seem to be trying to do this in Power Query?  Is that where your DAX queries are stored?

 

This is what the general process would look like. NOTE:  Check the API usage conditions before proceeding!

 

 

 

let
    Source = #table({"Raw"},{{"Show = 
var m = max(Dates[Date])
var d = CALCULATE(max('Table'[Transaction Date]),ALLEXCEPT('Table','Table'[Customerid]),'Table'[Transaction Date]<=m && 'Table'[Transaction Date]>= EDATE(m,-3))
return if (SELECTEDVALUE('Table'[Transaction Date])=d,1,0)"}}),
    #"Added Custom" = Table.AddColumn(Source, "Link", each "https://www.daxformatter.com/?embed=1&fx=" & Uri.EscapeDataString([Raw])),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Result", each Web.BrowserContents([Link],[WaitFor = [Selector = "div.result"]])),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Added Custom1", "Result", Splitter.SplitTextByEachDelimiter({"<div class=""result"">"}, QuoteStyle.None, false), {"Result.1", "Result.2"}),
    #"Split Column by Delimiter1" = Table.SplitColumn(#"Split Column by Delimiter", "Result.2", Splitter.SplitTextByEachDelimiter({"</div"}, QuoteStyle.Csv, false), {"Formatted HTML", "Result.2.2"}),
    #"Removed Other Columns" = Table.SelectColumns(#"Split Column by Delimiter1",{"Raw", "Formatted HTML"})
in
    #"Removed Other Columns"

 

and then displayed in a HTML5 viewer visual:

lbendlin_0-1683119352472.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors