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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Kaalu007
Frequent Visitor

Calculating saving from 2 columns with 0 (Zero) or with no value(blank/null) values in it.

Hi All,

 

From Target (Column 1) & Actual(Column 2), I am trying to calculate Saving (Column 3).

 

Saving in possible below senarios, and below to this image my attempt of power query custom column. 

Kaalu007_0-1686981743579.png

= if [Target] = [Expense] or [Target]=null or [Expense]=null or [Target]=0 or [Expense]=0 then null else [Target]-[Expense]

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

plse try this

 

 

[ 
t = [Target]*[Expense],
to = if t <> 0 and  t <> null 
then [Target] -[Expense] 
  else null][to]
------- or -----------

[
t= [Target]*[Expense]?? 0 ,
to = if t> 0 then [Target]-[Expense] 
   else null][to]

 

 

Screen Capture #1267.pngScreen Capture #1268.png

View solution in original post

1 REPLY 1
Ahmedx
Super User
Super User

plse try this

 

 

[ 
t = [Target]*[Expense],
to = if t <> 0 and  t <> null 
then [Target] -[Expense] 
  else null][to]
------- or -----------

[
t= [Target]*[Expense]?? 0 ,
to = if t> 0 then [Target]-[Expense] 
   else null][to]

 

 

Screen Capture #1267.pngScreen Capture #1268.png

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.