Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi,
I am trying to divide 2 columns in power query editor by adding a new column but when using simple / sign function I will get infinity, n/a etc return when 0 is included and when trying to use DIVIDE function it shows that it´s not recognized.
The two columns I need are
=[#"Rental Value (ERV)"]/[Total Area]
Can you please help me so everything divided by 0 returns as blank without errors?
Thank you
Solved! Go to Solution.
Hi @matka123499
Try the following code.
if [Total Area]<>0 then [#"Rental Value (ERV)"]/[Total Area] else null
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @matka123499
Try the following code.
if [Total Area]<>0 then [#"Rental Value (ERV)"]/[Total Area] else null
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @matka123499 ,
You can use below query to check for the black values..
[Column Name] = IF ( 'YourTable'[Total Area] <> 0,
'YourTable'[Rental Value (ERV)] / 'YourTable'[Total Area],
BLANK () )
If you like this solution please upvote and consider marking it as solution accepted
Thanks!
I used bellow but get an error Token literal expected.
Column Name] = IF ( 'Merged Data'[Total Area] <> 0,
'Merged Data'[Rental Value (ERV)] / 'Merged Data'[Total Area],
BLANK () )
Use below. You can use anything else also in place of null
= try [#"Rental Value (ERV)"]/[Total Area] otherwise null
I tried this but still getting #Num! where anz of the divided columns is 0
Hi @matka123499 ,
try this one
Division Result = IFERROR(DIVIDE('YourTable'[Rental Value (ERV)], 'YourTable'[Total Area]), BLANK())
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |