Forum Discussion

rpinxt's avatar
rpinxt
Icon for Solution Sage rankSolution Sage
2 years ago
Solved

Formatting in a calculation group item

I made this calculation group items :

So 3 pieces. But 2 of them are pecentages.

The calculation group works just fine 

But when you select a percentage:

I would rather have a decent percentage with 1 decimal.

Can that be done?

 

 

 

  • Hello! You can create the format string to display as a percent. In Power BI, click on the calculation item that you want to format, then expand Formatting and toggle dynamic format string to on 

    Once it is on, you can enter the formatting you want:

    For percent you can do "#.#%" or however many decimal places you want.

     

    You can do the same in Tabular Editor 2.

     

8 Replies

  • Hello! You can create the format string to display as a percent. In Power BI, click on the calculation item that you want to format, then expand Formatting and toggle dynamic format string to on 

    Once it is on, you can enter the formatting you want:

    For percent you can do "#.#%" or however many decimal places you want.

     

    You can do the same in Tabular Editor 2.

     

    • rpinxt's avatar
      rpinxt
      Icon for Solution Sage rankSolution Sage

      Great audreygerred ! I had that pane hidden. Thank for pointing it out.

      However I am not yet fully there :

      Still giving me 2 decimals. Which make everything above 9,99% not to show.

      Any idea why I am not getting 1 decimal?

      • audreygerred's avatar
        audreygerred
        Icon for Super User rankSuper User

        That is odd. I am not sure why it is still showing 2 decimal places. When I do mine, it works. In the table on the left I have the calgulation group in and YoY% is showing 1 decimal place like I have it formatted to do, and in my table on the right I added in the measure I have explicitly defined and it is showing two decimal places (like that measure is formatted to do). 

         

  • rpinxt's avatar
    rpinxt
    Icon for Solution Sage rankSolution Sage

    Ok audreygerred I see why yours is working....
    I converted my stacked column into a matrix:

    Now it has also 1 decimal....🤔

     

    Something in the formatting of the stacked column chart??

     

    • audreygerred's avatar
      audreygerred
      Icon for Super User rankSuper User

      It could be - maybe in the stacked column you had it set to two decimals in the visual formating pane.

      When I make a stacked column with my calculation group, I get the one decimal like I have specified:

      However, if I change the formatting on the viusal itself to 2, then I have 2:

       

      • rpinxt's avatar
        rpinxt
        Icon for Solution Sage rankSolution Sage

        Yes I made one from scratch and there was also only 1 decimal.

        Will dig a bit deeper in my old stacked column to see if I can find something.

        Otherwise nothing else to do than recreate.

        Thanks for the info!