Forum Discussion

stevedep's avatar
stevedep
Memorable Member
5 years ago

Sharing: Use Dynamic SVG for Debugging or Teaching DAX.

Hi all,

 

I am writing this to share an idea to debug/explain the inner working of DAX code to others. The DAX code generates SVG code that allows us to highlight certain rows. Perhaps these are rows we like to work with when an inner DAX statement is at work. 

 

Hopefully, the below code is self-explanatory. Please mind that you need to change the 'Data Category' of the measure to 'Image URL'. I suggest changing the 'Image height' as well (see highlight in below image). The file is attached. 

 

Any (creative) suggestions for improvements or other use cases are welcome. 

Credits to  matemusic for the inspiration

 

 

4 Replies

  • The height is not a problem. You can use the HTML5 visual.

    What I am looking for is the entire table contents, column headers and all rows, as a SVG image.

    • stevedep's avatar
      stevedep
      Memorable Member

      ah ok, got it!

       

      Great tip, just use an HTML custom visual. Did not think of this. Learning every day! Thanks!

  • Here's a challenge for you. Write a piece of SVG that can return the entire contents of a table variable that is used when building a measure.