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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Rounding to nearest number in Power Query when i dont want to

Hi all, 

 

I have a dataset like the one below: 

Tobiasahansen96_0-1678697392658.png

When looking at the column "total_amount" i have certain values that have decimals after the figure. 

 

Then when looking in the column "amount_EUR" these numbers suddenly do not have any decimals? 

 

The amount_EUR just takes the value in total_amount if this value is of currency EUR. 

 

How do i keep the decimals numbers from total_amount to amount_EUR? Both columns are of data type "Fixed Decimal number"

 

6 REPLIES 6
Greg_Deckler
Super User
Super User

@Tobiasahansen96 What is your formula for amount_EUR?


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

The formula in Power Query are:  

Added Custom" = Table.AddColumn(#"Renamed Columns2", "amount_EUR", each [total_amount]*[rate_to_eur]/100)

@Tobiasahansen96 Bizarre, I can't replicate that behavior. See PBIX attached below signature.

 


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

It is fixed now - a mistake from my side by having a chaned type right to a whole number right after addin the extra column...

@Tobiasahansen96 Those Change types will get you!


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

Seems very weird 🤔

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors