Forum Discussion

MAIK2705's avatar
MAIK2705
Frequent Visitor
2 years ago
Solved

data converted automatically to decimal numbers

Hi everyone,   I'm struggling with an issue in Power BI where  percentages are automatcally recognized as a decimal values. This is the data table FundId 2023-01 2023-02 2023-03 2023-04 20...
  • BA_Pete's avatar
    2 years ago

    Hi MAIK2705 ,

     

    This can be resolved by following a couple of best-practice guidelines:

     

    1) Structure your data correctly for reporting (normalisation):

    After your navigation step, select your [FundId] column and go to the Transform tab > Unpivot Column (dropdown) > Unpivot Other Columns.

    You will now have a normalised fact table structure with an [Attribute] and [Value] column.

    You can change the names of these if you want by amending the code that has been created in the formula bar:

     

     

    At this point, you can just change the Data Type of the new [Attribute] and [Value] columns. This will always work as you're no longer hard-coding specific column names into the transformation code.

     

    2) Type your data correctly (standard data types):

    Do not use the percentage data type in Power Query. It's just a mask over a Decimal type anyway. Change your new [Value] column to Decimal type and adjust the format under MEasure Tools in the Report View:

     

     

     

     

    Pete