Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have created a Power Bi report
It combines multiple excel files from a SharePoint site
The report is published and everything works fine except...
One column is supposed to be data type %,
however in the sample data only values 1, 2, 0 were present
Power bi set the data type as whole number
And thus, everything in the column rounds to nearest whole number
I have tried to change the data type in the query editor but nothing seems to affect the report, it always rounds to nearest whole number.
Please help…
Solved! Go to Solution.
I'm hazarding a guess here, but the data type has probably been set automatically as an integer. Check in Power Query, under the Applied Steps, look for "Changed type":
You can either delete the step and set the data types for each column manually or change the type in the code itself to "number"
Proud to be a Super User!
Paul on Linkedin.
I'm hazarding a guess here, but the data type has probably been set automatically as an integer. Check in Power Query, under the Applied Steps, look for "Changed type":
You can either delete the step and set the data types for each column manually or change the type in the code itself to "number"
Proud to be a Super User!
Paul on Linkedin.
thank you 🙂
Thank you!... it worked kind of... I have 5 'chnage Type' steps, most of them were intentional. I have deleted them all as a test and the column is displaying correctly. However I really only want to delet the right one save a lot of work, applying query chnages takes a long time so testing iteratively not easy either. is there a way to see what each chnaged type is doing?
I cant seem to see the formula view of the 'chnaged type' step in your screenshot
The rogue transformation in your case is most probably in the very first step for "Changed Type" (the first in the list the applied steps).
You can enable the formual bar by going to "View" in the ribbon and checking the "formula bar" checkbox:
Alternatively you can find the rogue transformation by looking at the whole code under "Home" and "Advanced Editor".
Look for the first "Changed Type" step, find the column (by name) and change the code of
{"Sales", Int64.Type} to {"Sales", type number} (where "Sales" is the column you need correcting (so whatever the column is labeled in your case). Be careful since M code is case sensitive.
Proud to be a Super User!
Paul on Linkedin.
@stusmif , Please also check data type in Data model view or column tools. It needs to be decimal with a few decimal place. If needed % is selected
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |