Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Matrix Table Visualization - possibility to have both decimal and % value into one column?

Hi Power BI community,

 

I had a values column with both absolute values and percentages where I used power query to unpivot the data into raw data (absolute value) and calculation % columns. This is because i want to separate decimal number and percentage formats in my initial table.  Now that I use matrix table in power BI, I have the separation as follows:

 

My Question is there a way to get the calculation field to stack under the raw data field? Id rather not use a calculated measure because my initial data has a variery of formulas in the table.

 

Thanks in advance =).

  • Hi, Anonymous 

    It is possible to have both decimal and % value into one column.

    You can use the function ‘format’ to convert the value format into  'Percent' first.

    Measure1 =
    IF ( ISBLANK ( [Raw data] ), FORMAT ( [Calcualtion%], "Percent" ), [Raw data] )

    Best Regards,
    Community Support Team _ Eason

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous I am not following what you mean when you say "Id rather not use a calculated measure...".  Really, you should be defining explicit measures to begin with (implicit measures as you show are not a best practice).

    I don't think what you're looking to achieve is going to be possible without using either some sort of SWITCH measure, calculation groups, or a custom visual.

    https://exceleratorbi.com.au/two-number-formats-one-column-what/ 

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

    It is possible to have both decimal and % value into one column.

    You can use the function ‘format’ to convert the value format into  'Percent' first.

    Measure1 =
    IF ( ISBLANK ( [Raw data] ), FORMAT ( [Calcualtion%], "Percent" ), [Raw data] )

    Best Regards,
    Community Support Team _ Eason