Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I have a column decimal with varying powers say 0,10,18,28 etc. Another column amount, which contains different values. My task is to create a new column which does the following function,
New column = if decimal <> 0 then (0.05*amount)/10^decimal else (0.05*amount)/10
I can't figure out how to do this. Creating a measure with exp option provides a feature to use an exponential function with a specific number only. I would like to generate exponential value for a column and perform the above operation.
Can somebody help me in pointing out in the right direction?
Thanks,
Indhu.
Solved! Go to Solution.
Hi @indhu,
In power query, we can add a custom column using the formula as below.
Custom = if [decimal]<>0 then 0.05*[amount]/Number.Power(10,[decimal]) else 0.05*[amount]/10
Here is the result as we excepted.
For more details, please check the pbix as attached.
https://www.dropbox.com/s/srngkyf65xim33h/Exponent%20calculation2.pbix?dl=0
Regards,
Frank
anyone worked with exponent calculation using calculated columns orr measures?
Hi @indhu,
I entered a table as you descried and create a new column as below to meet your requirement.
Column = IF(Table1[decimal]<>0 , (0.05*Table1[amount])/10^Table1[decimal],0.05*Table1[amount]/10)
For more details, please check the pbix as attached.
https://www.dropbox.com/s/384kq8rkcccaple/Exponent%20calculation.pbix?dl=0
Regards,
Frank
Hi @v-frfei-msft,
Thanks frank.
This is a calculated column, right? Is there any way to generate the same result in a custom column?
Thanks,
Kanthi.
Hi @indhu,
In power query, we can add a custom column using the formula as below.
Custom = if [decimal]<>0 then 0.05*[amount]/Number.Power(10,[decimal]) else 0.05*[amount]/10
Here is the result as we excepted.
For more details, please check the pbix as attached.
https://www.dropbox.com/s/srngkyf65xim33h/Exponent%20calculation2.pbix?dl=0
Regards,
Frank
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 64 | |
| 31 | |
| 29 | |
| 24 |