Forum Discussion

smizgier's avatar
smizgier
Frequent Visitor
11 years ago

Trouble with number formats

Hello,

 

I'm having a weird problem when switching between number format for a Measure created by me.

 

The formula is DIVIDE(DISTINCTCOUNT(tablahechos[idGarantiaMacal]);DISTINCTCOUNT(tablahechos[idLoteoMacal]))

 

When I set is as a percentage it shows 130% which is correct. But when I try using decimal number with 2 decimal after comma it shows 1,00 which is not correct.

 

Any help?

 

Thanks in advance!

4 Replies

  • Hi,

     

    It's possible to have a sample of youre data set with this measure ?

     

    Regards.

  • WillT's avatar
    WillT
    Icon for Community Admin rankCommunity Admin
    Hi - are you still seeing this problem? We made a lot of changes in the last couple of months around formatting, you are now able to control the number of decimal places etc. shown through the modelling ribbon and formatting pane. If you're still running into problems you can either reply here or Send a Frown from within Power BI Desktop. Thanks!
    • smizgier's avatar
      smizgier
      Frequent Visitor

      Srry for late answer,

       

      I used the "Fixed" formula and I solved the issue. I haven't tryed the new format features in that model.

       

      Cya

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

    If you want to show 1.30 instead of 130%, keep Decimal number format.

    If you want 130 → multiply by 100 in DAX:

     

    Measure = DIVIDE(DISTINCTCOUNT(tablahechos[idGarantiaMacal]), DISTINCTCOUNT(tablahechos[idLoteoMacal])) * 100


    Then format as Decimal number with 2 decimals.

     

    Key point: Percentage formatting just multiplies the value by 100 for display; decimal formatting shows the raw fraction.