Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Rounds of numbers automatically?

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

9 REPLIES 9
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

The number of decimal places is 0 by default. You should change it in Formatting pane.

 

2.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

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?

 

2.PNGCapture.PNG

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

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

@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"

2.PNGCapture.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Greg_Deckler
Super User
Super User

Have you tried increasing decimal in Formatting section of Modeling tab in ribbon?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

1.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.