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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
slatka11
Helper I
Helper I

Return value of a column if another column is null/blank?

Hi there,

 

I have the below 3 columns all in the same table (call it TABLE_1) and I am looking to return the value of one column if the other is blank:

 

MonthProjected RateActual Rate

December

1.351.34
January1.35 
February1.35 

 

What I am looking to acheive is that if the value in the "Actual Rate" column is blank, return the value in the "Projected Rate" column.

 

Thanks for your help.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

=if(isblank(Data[Actual rate]),Data[projected rate],Data[Actual rate])

See if this shorther calculated column formula works as well

=coalesce(Data[Actual rate],Data[projected rate])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
slatka11
Helper I
Helper I

Thank you very much

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

=if(isblank(Data[Actual rate]),Data[projected rate],Data[Actual rate])

See if this shorther calculated column formula works as well

=coalesce(Data[Actual rate],Data[projected rate])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

What if I have two columns that contain null values and I want the priority to be if either of the two columns have data return that value and if not, return 'NO KEY'

Example:

kjbox76_1-1728056954161.png

 



Hi,

I would do this in Power Query

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyNlHSUVKK1YlWAtKmZuYWYDZUHMKPBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"US PRODUCT KEY" = _t, #"CAN PRODUCT KEY" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"US PRODUCT KEY", Int64.Type}, {"CAN PRODUCT KEY", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [US PRODUCT KEY]=null and [CAN PRODUCT KEY]=null then "No Key" else List.FirstN(List.Select(Record.ToList(_), each _<>null),1)),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"

Hope this helps.

Ashish_Mathur_0-1728098731356.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi, 

 

What if I have to do same thing with both null and 0. I have both in my columns. 

 

Thank you, 

Umesh

Hi,

Share some data, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.