Forum Discussion

Emma_'s avatar
Emma_
Helper II
9 months ago
Solved

Dynamic Number Format - Bar Chart Group Totals

Hello, I came accross an issue in the bar chart. I would like to use a dynamic format for the measure I display in the bar chart - depending on selection value or qty I want to show 2 or 0 decimals.

My dynamic format measure is as follows.

SWITCH(MIN('🔄 SWITCH KPI'[KPI ID]),
    1,"#,0.00",
    2 , "#,0")
It works correctly when I use my main measure as detail label which I can set to auto, however it does not work for the group totals as by default there is an expected value of decimals. Does anyone have an idea how to solve this? In value scenari I have 2 decimals across all labels which is correct, only when I switch to qty I get it incorrectly in the total (red arrow). Thanks a lot for help.

 

 

  • Hi Emma_ ,

     

    Based on my tests the formatting works properly for both the values has the totals, on the totals I also have the auto option for decimal that allows to make it dynamic based on the measure:

     

     

4 Replies

  • Hi Emma_ ,

     

    Based on my tests the formatting works properly for both the values has the totals, on the totals I also have the auto option for decimal that allows to make it dynamic based on the measure:

     

     

  • MFelix thanks for your input. How were you able to set this to auto? for me it looks like that once it set to a number I cannot change this to auto.

    • MFelix's avatar
      MFelix
      Super User

      Hi Emma_ ,

       

      Just delete the number from the decimal definition on the labels should change to auto. Otherwise just reset the definitions of the label values to default and then check the result.

  • thanks a lot for your help. It looks like some settings have been overwritten by my corporate json theme and that's why it was not working for me. In the file without json it works correctly.