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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
MartaGS_S
New Member

Round to Significant Figures using Power Query

Hi  Community!   I've created a custom function in power query to round to any significant figures you need. IT solves this type of issues that scientists usually face, that is explained here: 

https://study.com/learn/lesson/significant-figures-scientific-notation-overview-rules-examples.html 

These is a sample of the output:

Capture.JPG

 

here is the function: Function_final_7.txt

  1. Open power bi and click 'Transform Data'
  2. Click 'New Source' -> 'Blank query' and paste the function
  3. Rename to 'Format_to_sigFig'
  4. Click 'Add Column'-> 'Invoke Custom'-> column name as 'Fixed'-choose function column and the num as the text column and the sigfig column
  5. Click ok-> Transformation is done and you can grab the column in your visual. Close & Apply

 

5 REPLIES 5
jjeason
New Member

Hi, this doesn't seem to be working for me for values less than or equal to -1

MMMiranda
Frequent Visitor

Excellent, I appreciate you!  Thanks for sharing this.

pdqrose
New Member

The link the txt file doesn't seem to work.   Could you possibly send me the query text please?

Done

tcgarrod
New Member

It works perfectly!  This contribution will surely be an asset to all those looking for a way to correctly identify significant figures.  Thank you Marta!  😃  

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors