Forum Discussion
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:
here is the function: Function_final_7.txt
- Open power bi and click 'Transform Data'
- Click 'New Source' -> 'Blank query' and paste the function
- Rename to 'Format_to_sigFig'
- Click 'Add Column'-> 'Invoke Custom'-> column name as 'Fixed'-choose function column and the num as the text column and the sigfig column
- Click ok-> Transformation is done and you can grab the column in your visual. Close & Apply
5 Replies
- tcgarrodNew 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! 😃
- pdqroseNew Member
The link the txt file doesn't seem to work. Could you possibly send me the query text please?
- MartaGS_SNew Member
Done
- MMMirandaFrequent Visitor
Excellent, I appreciate you! Thanks for sharing this.
- jjeasonNew Member
Hi, this doesn't seem to be working for me for values less than or equal to -1