Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Align to left in Dax format

I am trying to create a custom tooltip, using the code below. And I would like to align to the Result to the left. many thanks in advance.

measure = 
    
    VAR diffs = SWITCH(
                    TRUE(), 
                    [Week%Change@AOP24] < 0,
                    UNICHAR(10004), UNICHAR(10008))
                    //UNICHAR(9989), BLANK())
    
    VAR Result = // Need to align to the LEFT
        "CW @AOP24: " & FORMAT( [CW @AOP24], "$#,0") & UNICHAR ( 10 ) &
        "PW @AOP24: " & FORMAT( [PW @AOP24], "$#,0") & UNICHAR ( 10 ) &
        "Change @AOP24: " & FORMAT(  [CWvsPWatAOP24], "$#,0") & " (" & FORMAT([Week%Change@AOP24], "Percent") & ") " & diffs
    
    RETURN Result 

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Alignment isn’t really possible without using monospaced fonts which will be very ugly. You’re better off putting the separate columns that need to be aligned in a table visual or HTML visual using a grid/flexbox/table layout and using that on a report page tooltip instead.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading