Forum Discussion

akhilduvvuru's avatar
akhilduvvuru
Icon for Helper IV rankHelper IV
3 years ago
Solved

Format Error while displaying numbers and percentages at same time in a table

Hi Team, I have a reqirement to show both numbers and percentages in same column using a measure as below: I wrote a switch statement in measure   Measure = VAR _Cat = SELEECTEDVALUE(CATEGORY) V...
  • v-yadongf-msft's avatar
    3 years ago

    Hi akhilduvvuru ,

     

    As a workaround, please try following steps.

     

    This is my test table:

     

    Create a new column:

     

    Column =
    VAR _a = 'Table'[SALES] * 100
    VAR _b =
        IF ( 'Table'[CATEGORY] = "Total %", _a, 'Table'[SALES] )
    VAR _c =
        CONVERT ( _b, STRING )
    RETURN
        IF ( 'Table'[CATEGORY] = "Total %", _c & "%", _c )

     

     

    You will get a column like this:

     

    I think this is the result you want:

     

    Please refer the attached pbix file.

     

    Best regards,

    Yadong Fang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.