Forum Discussion

kyrpav's avatar
kyrpav
Icon for Helper V rankHelper V
4 years ago
Solved

FORMAT function with standard string and 1 decimal digit

I have a pivot table and for the calculation of the values i am using a switch statement. For each different row i have a different calculation.   Code of each row is like this:       SWITCH(S...
  • OwenAuger's avatar
    OwenAuger
    4 years ago

    Yes that's the idea.

     

    I would suggest you use variables to avoid evaluating the same measure(s) multiple times.

     

    The code I posted earlier was what I was thinking as far as structure:

    • Store the measure itself in one variable MeasureValue (T_01, T02 etc).
    • Then store the chosen format string in a second variable
    • Finally, format the measure using the format string