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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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