Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey!
I have a line and stacked chart, that sums the downtime of a duration as:
Down_h = CALCULATE(SUM(Utilizations[Duration_h]),FILTER(Utilizations,[ActualState]="Down"))
Where the duration_h is in data type decimal number in both the querie editor and in the data table of powerBI. The data typically are as 0.016667 for example, and never a whole number. But when I put the Down_h in the line and stacked chart, and looks at it for every hour, I get that it automatically rounds it off to a whole number, as 1 hour down time 0h operational, even though I can see on the screen the actual procentage of the stacked chart, even though it might be 50 minutes down and 10 operational, why does it do like this?
Kind regards
Agnes
Hi @Anonymous,
The number of decimal places is 0 by default. You should change it in Formatting pane.
Regards,
Frank
Yes, I have added more decimal number, and it shows the decimals in the tables in the beginning, but rounds it off when I drag it into the stacked chart, but when I calculated the procentage of it instead it shows the correct dimensions in numbers.
I also have another PowerBI chart, with the same problem where I don't want to make it as a procentage, and there it rounds the numbers of from the data querie down to the powerBI data table, and when I change the formatting to more decimalnumbers it just puts more zeros.
The first picture is from inside "Edit queries" and the next on with "close and apply", even though I change decimal number?
Hi @Anonymous,
What is your version of Power BI desktop? Did you use the latest version? How did you get your column RunNoload? Could you please share your pbix to me? You can share your file to ondrive and share the link here. And kindly share your M code to me as well.
Regards,
Frank
@v-frfei-msft it is version, 2.64.5291.0,
Both RunLoad_h, and RunNoLoad_h is taken directly from the SQL database, they are then in seconds, and whole numbers as 6372969, and Data type DecimalNumber from the beginning, they are then divided with 3600 :
= Table.TransformColumns(#"Added Index", {{"RunLoad_s", each _ / 3600, type number}})
the data then becomes as 1770.269167, and the data type is still DecimalNumber
When I close and apply, the data gets rounded to 1779, even though I put data type decimal number in formatting as well, and I rather not share the powerBI since it is confidental data and I am not permitted to share it really.
Regards Agnes
Hi @Anonymous,
I cannot reproduce your issue here either . Could you please share your pbix and all of your M code to me?
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIyMjZUitUBskyNzcAMY2MjQ1Mo08jI1AQqCwQQMaA6S6isoZFSbCwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Int64.Type}}), #"Add custom column"= Table.TransformColumns(#"Changed Type", {{"Column1", each _ / 3600, type number}}) in #"Add custom column"
Regards,
Frank
Hi @Anonymous,
Has your issue been solved? If solved, kindly mark my answer as a solution to close the case. If any other question feel free to let me know please.
Regards,
Frank
Have you tried increasing decimal in Formatting section of Modeling tab in ribbon?