Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Value format as per parameter

Hi,   How can I dynamically change its format as per specific column?  e.g. If 'Unit' = [%] then decimal 2 such 99.99 If 'Unit' <> [%] then whole number such 99999   please help create measure...
  • danextian's avatar
    1 year ago

    Hi Anonymous 

    Add a column that indicates the format string for each each row. Select the measure, go to Format and select Dynamic

    The first row's format string would be 0.00%, while the second row would use the format #,0.00.

    Note: You may need to divide your percentage values by 100. Otherwise, they could appear incorrectly — for example, 0000% or 9986% instead of the expected percentages.

     

    Please refer to this blob - Create dynamic format strings for measures