cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Power Query divide

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]

Thank you

1 ACCEPTED SOLUTION
Community Support

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.

6 REPLIES 6
Community Support

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.

Microsoft Employee

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!

Frequent Visitor

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 () )

Super User

Use below. You can use anything else also in place of null

``= try [#"Rental Value (ERV)"]/[Total Area] otherwise null``

Frequent Visitor

I tried this but still getting #Num! where anz of the divided columns is 0

Microsoft Employee

Hi @matka123499 ,

try this one

Division Result = IFERROR(DIVIDE('YourTable'[Rental Value (ERV)], 'YourTable'[Total Area]), BLANK())

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.