Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sdhn
Responsive Resident
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")

 

ABCDEFGHIJ
A132296147.5%6.26133.91140.172.298APRIL 2021
B1720720.0%0.9984.1685.151.183APRIL 2021

 

 

sdhn_0-1641313239121.png

 

Help will be appreciated.   Thanks

 

 

 

1 ACCEPTED SOLUTION

@sdhn  take a look here

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

7 REPLIES 7
smpa01
Super User
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)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
sdhn
Responsive Resident
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]))

 

Please advice.  Thank you

 

@sdhn 

_H = IF('Table'[D]>0,'Table'[F]+'Table'[G],0)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
sdhn
Responsive Resident
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 

@sdhn  take a look here

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
sdhn
Responsive Resident
Responsive Resident

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

Still not working for me.    Thanks 

@sdhn  yes 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors