Forum Discussion

MMSS's avatar
MMSS
New Member
2 years ago
Solved

different formats in tabular editor

Hi Guys. I have the following code:

I want the measure [a] to have the format= "+#,0;-#,0" und the other measures ([b], [c], [d], [e]) to have the format "+#.0 %;-#.0 %". how am i doing this? If I change the format in the "Format String Expression"-field, all of the format changes. Thankful for every help!

  • Hi MMSS ,

     

    You can use below format expression.

     

    SWITCH (
        TRUE (),
        ISSELECTEDMEASURE ([a]),"+#,0;-#,0",
        ISSELECTEDMEASURE ([b],[c],[d],[e]),"+#.0 %;-#.0 %",
        SELECTEDMEASUREFORMATSTRING ()
    )

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~

1 Reply

  • Hi MMSS ,

     

    You can use below format expression.

     

    SWITCH (
        TRUE (),
        ISSELECTEDMEASURE ([a]),"+#,0;-#,0",
        ISSELECTEDMEASURE ([b],[c],[d],[e]),"+#.0 %;-#.0 %",
        SELECTEDMEASUREFORMATSTRING ()
    )

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~