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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
AlixB
Frequent Visitor

Calculated column that references another table column if current value is blank

I have a column in a table where some values are blank and need to be populated with a value from another table. 

the Hours YTD value is what is needed to populate the blanks

 

AlixB_1-1631613367231.png

AlixB_4-1631613540717.png

It needs to be done as a calculated column/measure as needs to be dynamic, the replacement value is based on the date filter.

 

There is a relationship between both tables which are date columns. However the blank fields have blank date fields too. There is a blank option in the date slicer which allows for blanks to show in the table.

I've tried the below abut it doesn't work as there is nothing to link the tables so returns nothing.

Hours Available =
IF(CALCULATE(SUM('Report Reliability_YearlyTotal'[TimeAvailable])) = BLANK(),
AVERAGE('Date'[DimDateMonthHours]),
CALCULATE(SUM('Report Reliability_YearlyTotal'[TimeAvailable])))
 
Any help would be appreciated
1 ACCEPTED SOLUTION

@lbendlin 

I actually solved the issue in SQL so that my source data has the information for the last 5 years, but thanks for looking at it

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

if you need it dynamic then it cannot be a calculated column - it has to be a measure.

 

How are your rows sorted, or does that not matter?

 

Please provide sanitized sample data in usable format (not as a picture - inserting it into a table would be good, or provide a sample pbix) .

@lbendlin 

I actually solved the issue in SQL so that my source data has the information for the last 5 years, but thanks for looking at it

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.