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

Responsive Resident

## If Column >< or = 0

Hello All,

I have a spread sheet. I need to create calculate column for E, H & I columns in Power Bi. So my source spreadsheet will be without E, H & I columns.

I like to calculate all columns through Power Bi.

For Column E formula in Spread sheet is as:  =IF(D2<=0,"N/A",(C2/D2))

For Column H formula in Spread sheet is as: =IF(D2>0,SUM(F2:G2),0)

For Column I formula in Spread sheet is as:  =IF(H2>0,(H2/D2),"N/A")

 A B C D E F G H I J A1 32 29 61 47.5% 6.26 133.91 140.17 2.298 APRIL 2021 B1 72 0 72 0.0% 0.99 84.16 85.15 1.183 APRIL 2021

Help will be appreciated.   Thanks

1 ACCEPTED SOLUTION
Super User

@sdhn  take a look here

Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
7 REPLIES 7
Super User

@sdhn  calculated column in dax

``````E = IF('Table'[D]<=0,0,DIVIDE('Table'[C],'Table'[D]))
H = IF('Table'[D]<=0,0,DIVIDE('Table'[C],'Table'[D]))
I = IF('Table'[H]>0,DIVIDE('Table'[H],'Table'[D]),0)``````
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Responsive Resident

Hi Smpa01,

Thanks for prompt response.

For column E & I works fine.

But look at formula of col. H

Column Name : Total Amount (H)

=IF(D2>0,SUM(F2:G2),0)

Its requires sum of F2:G2.  isn't?

you suggested as:

`H = IF('Table'[D]<=0,0,DIVIDE('Table'[C],'Table'[D]))`

Super User
``_H = IF('Table'[D]>0,'Table'[F]+'Table'[G],0)``
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Responsive Resident
`H = IF('Table'[D]>0,'Table'[F]+'Table'[G],0)`

I am getting following message:

<pi>A circular dependency was detected: TABLE[Column], TABLE[Column E], TABLE[Column].</pi>

We created Column E earlier as:

`E = IF('Table'[D]<=0,0,DIVIDE('Table'[C],'Table'[D]))`

Thanks

Super User

@sdhn  take a look here

Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Responsive Resident

Is it possible , I can send you a sample source file?

Still not working for me.    Thanks

Super User

@sdhn  yes

Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors