Forum Discussion

acollins1984's avatar
acollins1984
New Member
1 year ago
Solved

Data Type for Data Label Changes Once Dashboard Published to Server

I ran into issue that appears to have just popped up overnight where I have a data label that has a percent value on Power BI desktop but shows a whole number when the dashboard is published to the s...
  • collinq's avatar
    1 year ago

    HI acollins1984 ,

     

    Depending upon whom you ask, this is either a "feature" or a "bug" that happens now and then.  To make sure that
    the Service and the Desktop match, make sure it is formatted correctly.  In Desktop, select the column, then , in the ribbon make sure that the format is set to Percentage and not to a number or decimal.  AND, make sure that the number of space you want for the Percentage is set.

     

    If it is a measure or DAX column, make sure that you have the formatting in the statement set to the percentage (somethign like "0,00%").

    Or, you could even look at the Data Label in the Format Pane and make sure the value is set to percentage as well.

    Then, republish and take a look.


  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi acollins1984 

    Thanks for reaching out for Microsoft Fabric community.

    Power BI sometimes loses formatting on visuals  especially card visuals  when the data type is not explicitly set as a percentage. The measure returns a decimal (like 0.66) but formatting is applied only in the visual (not in the DAX) or if locale/regional settings in Power BI Service differ from your Desktop.

    Format in the DAX measure itself, instead of relying only on the visual to show percentages, hardcode the formatting inside your DAX measure.

    If your original measure is like - Percent Complete = DIVIDE([Completed], [Total])
    Update it to - Percent Complete Formatted = FORMAT(DIVIDE([Completed], [Total]), "0%")

    Then use Percent Complete Formatted in your card.Once cross Check that the Data Type is set to Text, not Decimal

    Since you're now using FORMAT, this becomes a text, so, Go to Model view → Select the new measure, make sure it says Data type = Text

    This ensures Power BI doesn't reformat the result.

    Clear the visual formatting, sometimes the card visual holds on to old settings, try to delete and re-add the card visual (if possible), or reset the Data label display units to "None" and Turn off “Value Decimal Places” to avoid auto-rounding.

    Publish Again and Verify

    After you've implemented the formatted DAX and verified on Desktop and Save the .pbix and publish. Then Check in Power BI Service to confirm the formatting is now respected.

    Still needs any debug, If you want to avoid using FORMAT() (e.g., to keep sorting or tooltips functional), another route is once ensure the Data type of the measure is set to Decimal Number and then in the Model view, explicitly set the Format as Percentage, and apply 2 decimal places.

    This avoids text conversion but relies more on visual settings being respected.

    If the above information helps you, please give us a Kudos and marked the Accept as a solution.

     

    Best Regards,
    Community Support Team.