Forum Discussion

chris7777au's avatar
chris7777au
New Member
4 years ago
Solved

How to format decimal places in a table visualisation?

Hi people.

I have a querry pulling data direct from Dynamics Business Central, which contains a 'quantity' field from our sales orders.  When I add the field to the table visualisation, it's displaying with two decimal places.  I've attempted already to go to Data > Column Tools and changed the Data Type to "Whole Number" and the format to "Whole Number" and the decimals to 0.  It is displaying correctly in the Data View, but the format isn't flowing through to the report view.  The only way I could make it work is to remove the field in the report and re-insert it.  Am I missing something or do changes made in the Data View only take effect if you remove and then add the field again (i.e. it doesn't dynamically update the report).  

Cheers

 

  • Hi chris7777au 

     

    Certainly give what VahidDM has mentioned a go.  It could just be a random glitch in the specific session that may not be repeat again.

     

    The other thing you need to consider is that a visual (such as a Table visual) has its own settings. If formatting settings have been set at the visual level, and then changes to the format (such as decimal places) take place at the Field level using the ribbon's Column formatting options, the visual formatting should not change because the formatting is taking place at separate layers (if that makes sense).

     

    So my understanding of this is that a visual's formatting once set will only change if you change it at the visual level, irrespective of the changes made at the Column / Data View level.

     

    All the best!

    Theo

     

4 Replies

  • Hi chris7777au 

     

    Have you tried to close your report and open it again, then test this?

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/

     

     

  • TheoC's avatar
    TheoC
    Icon for Community Champion rankCommunity Champion

    Hi chris7777au 

     

    Certainly give what VahidDM has mentioned a go.  It could just be a random glitch in the specific session that may not be repeat again.

     

    The other thing you need to consider is that a visual (such as a Table visual) has its own settings. If formatting settings have been set at the visual level, and then changes to the format (such as decimal places) take place at the Field level using the ribbon's Column formatting options, the visual formatting should not change because the formatting is taking place at separate layers (if that makes sense).

     

    So my understanding of this is that a visual's formatting once set will only change if you change it at the visual level, irrespective of the changes made at the Column / Data View level.

     

    All the best!

    Theo

     

    • chris7777au's avatar
      chris7777au
      New Member

      Hi Theo - you got it.  I hadn't realised (I'm new to PowerBI) that you could set the field settings at both the Visualization level and the Data layer.  I'm sure this has a purpose... but it tripped me up.  The visual table must pickup up the formatting from when a field is initially placed in the visual.  Subsequent to that you must either need to change it at the visual level, or remove then add back the field to get it to update to the formating int he data table (if it's been modified).  Thanks for your help.

      • TheoC's avatar
        TheoC
        Icon for Community Champion rankCommunity Champion

        chris7777au spot on!  Power BI in itself, whether it be formatting (such as that in your example) or filtering, etc, has been designed with various layers. It's quite sophisticated and, at the same time, very logical.  Enjoy the journey! It's always an enjoyable one! And, if you get stuck on anything, hit up VahidDM!  The guy is literally one of the most insanely gifted people you will meet across the Community!