Forum Discussion

smpa01's avatar
smpa01
Community Champion
2 years ago
Solved

Left align calculation item for string

Is there any way for me to create a format string expression so that the desired calculation item(string) is left aligned

BernatAgulloMVP parry2k 

 

Set up

 

They would be left aligned if they were of same length. But that is not possible, yt how can they be left aligned.

  • smpa01 I think you will do left align in the matrix visual format pane for specific column:

     

     

2 Replies

  • smpa01 I think you will do left align in the matrix visual format pane for specific column:

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Default alignment will depend on base measure. If it's a number, (or blank?) it will be right aligned, if it's text it will be left aligned. If you want to have both and use the Calc group column in the columns of the visual is a bit tricky. I would try this.

     

    Measure= blank() 

    Precedence 20 your calc group

    Precedence 10 a Calc group that depending on the selected value in your calc group replaces with 0 or with "" the selected measure

    Precedence 20 your calc group.

     

    But I'm thinking this will not work

     

    Different approach have two base measures, zero and Empty string

    Then in your calc group and some logic so that left aligned Calc items only work on the zero and right aligned in the empty string. But maybe that does not work either

     

    Tricky!