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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Ankit041
Frequent Visitor

How to round negative values

Capture.PNG

 

As you guys can see I have already applied Round up to 2 decimal place for Actual profit columns. But it seems that for some negative decimal values it is not applying and for some it is working fine. Suggest me how to round it up . e,g  (1524.4400000001) to (1524.44).

14 REPLIES 14
v-yulgu-msft
Employee
Employee

Hi @Ankit041,

 

Have you resolved your problem? If so, would you please kindly mark the helpful reply as an answer or sharing your solution?

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

No  the problem still persists. I have used all the know thing to resolve it but with no affect.

Have you set the formatting to a 2 place decimal?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Yes I did but still the value of the highlighted ones are not changing at all

Can you show us the formula for that measure and the data type and formatting on it from the Modeling tab?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The problem is in the Query view it is rounding up  to 2 decimal values. But as soon as I am reverting back to report view its is not getting round up..Strange isn't it.

 

Capture.PNGCapture1.PNGCapture2.PNG

This is the formulae Power BI is using

 

= Table.TransformColumns(#"Changed Type2",{{"Actual Profit", each Number.Round(_, 2), type number}})

 

Actual Profit is the Column Name.

Right, so after you load it from the query when you're back in the report, check the formatting in the Modeling tab.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The formatting ribbon is disable for me as you can see in the screen shotCapture4.PNG

You have to select the column.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I did that.

Hi @Ankit041,

 

Please check the data type of [Actual profit] in report view.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Its decimal. And I got the solution. Actually in the data query view you can change the formatting of the column . I don't understand why the formulae I have used for the column is not overriding everything else. What is the purpose of the making query level changes when we have to manually change the formatting again .

Greg_Deckler
Super User
Super User

Should just be:

 

Column = ROUNDUP([Column],2)

Shouldn't matter if it is negative. You would need this wrapped around whatever your calculation is for Actual Profit.


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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