As a measure, you could do something like below. I'm assuming that you have a model as follows:

  • Fact: (Date, ID, Value)
  • DimDate: (Date, ...)
  • Rates: (ID, Rate)
  • Dim: (ID, ...)

With these tables you'd have relationships as below:

  • Dim -1:N-> Fact
  • Dim <-1:1-> Rates
  • DimDate -1:N-> Fact

With the model above, you could then build a visual of:

  • Rows: DimDate[Date]
  • Columns: Dim[ID]
  • Values: [Value Or Rate Measure]
Value = SUM ( 'Fact'[Value] )
Rate = SUM ( 'Rates'[Rate] )
Value Or Rate Measure =
VAR Value = [Value]
RETURN
  IF ( ISBLANK ( Value ), [Rate], Value )

This might not do what you want for totals - you didn't specify. So if you need visual totals you might try the following:

Value or Rate - visual totals =
SUMX (
  CROSSJOIN ( VALUES ( 'Dim'[ID] ), VALUES ( 'DimDate'[Date] ) ),
  [Value Or Rate Measure]
)

You could also handle this in Power Query M, assuming you have the same tables I've described above. I'm assuming each table has an associated query of the same name.

let
    Source = Table.AddColumn(Dim, "Date", each DimDate[Date]),
    #"Expanded Date" = Table.ExpandListColumn(Source, "Date"),
    #"Merged Queries" = Table.NestedJoin(#"Expanded Date", {"id", "Date"}, Fact, {"ID", "Date"}, "Fact", JoinKind.LeftOuter),
    #"Expanded Fact" = Table.ExpandTableColumn(#"Merged Queries", "Fact", {"Value"}, {"Value"}),
    #"Merged Queries1" = Table.NestedJoin(#"Expanded Fact", {"id"}, Rates, {"ID"}, "Rates", JoinKind.LeftOuter),
    #"Expanded Rates" = Table.ExpandTableColumn(#"Merged Queries1", "Rates", {"Rate"}, {"Rate"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Rates", "Value Or Rate", each if [Value] = null then [Rate] else [Value]),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Value", "Rate"})
in
    #"Removed Columns"

Here, we're doing something similar, but at a table level, instead of as a measure. We crossjoin Dim[ID] and DimDate[Date] to get a dense table of all date and ID combinations. Then we left join the original Fact table and the Rates table. Then we add a column that takes [Value] if it exists, or [Rate] if [Value] is null.

Answer from greggyb on Stack Overflow
Top answer
1 of 1
1

As a measure, you could do something like below. I'm assuming that you have a model as follows:

  • Fact: (Date, ID, Value)
  • DimDate: (Date, ...)
  • Rates: (ID, Rate)
  • Dim: (ID, ...)

With these tables you'd have relationships as below:

  • Dim -1:N-> Fact
  • Dim <-1:1-> Rates
  • DimDate -1:N-> Fact

With the model above, you could then build a visual of:

  • Rows: DimDate[Date]
  • Columns: Dim[ID]
  • Values: [Value Or Rate Measure]
Value = SUM ( 'Fact'[Value] )
Rate = SUM ( 'Rates'[Rate] )
Value Or Rate Measure =
VAR Value = [Value]
RETURN
  IF ( ISBLANK ( Value ), [Rate], Value )

This might not do what you want for totals - you didn't specify. So if you need visual totals you might try the following:

Value or Rate - visual totals =
SUMX (
  CROSSJOIN ( VALUES ( 'Dim'[ID] ), VALUES ( 'DimDate'[Date] ) ),
  [Value Or Rate Measure]
)

You could also handle this in Power Query M, assuming you have the same tables I've described above. I'm assuming each table has an associated query of the same name.

let
    Source = Table.AddColumn(Dim, "Date", each DimDate[Date]),
    #"Expanded Date" = Table.ExpandListColumn(Source, "Date"),
    #"Merged Queries" = Table.NestedJoin(#"Expanded Date", {"id", "Date"}, Fact, {"ID", "Date"}, "Fact", JoinKind.LeftOuter),
    #"Expanded Fact" = Table.ExpandTableColumn(#"Merged Queries", "Fact", {"Value"}, {"Value"}),
    #"Merged Queries1" = Table.NestedJoin(#"Expanded Fact", {"id"}, Rates, {"ID"}, "Rates", JoinKind.LeftOuter),
    #"Expanded Rates" = Table.ExpandTableColumn(#"Merged Queries1", "Rates", {"Rate"}, {"Rate"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Rates", "Value Or Rate", each if [Value] = null then [Rate] else [Value]),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Value", "Rate"})
in
    #"Removed Columns"

Here, we're doing something similar, but at a table level, instead of as a measure. We crossjoin Dim[ID] and DimDate[Date] to get a dense table of all date and ID combinations. Then we left join the original Fact table and the Rates table. Then we add a column that takes [Value] if it exists, or [Rate] if [Value] is null.

🌐
Microsoft Fabric Community
community.fabric.microsoft.com › t5 › Desktop › Check-if-a-column-values-is-blank-and-simply-return-Yes-N › td-p › 1984043
Solved: Check if a column values is blank and simply retur... - Microsoft Fabric Community
July 30, 2021 - Another column CC = IF ( ISBLANK ( 'tablename'[columnName] ), "No", "Yes" ) If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up. Click here to visit my LinkedIn page ... Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap. ... Check out the February 2026 Power BI update to learn about new features.
🌐
Microsoft Fabric Community
community.fabric.microsoft.com › t5 › Desktop › IF-ISBLANK-Return-Blank › td-p › 538585
Solved: IF ISBLANK Return Blank - Microsoft Fabric Community
October 10, 2018 - Solved: Hi guys, Basically, if Date2 is blank then Age column should be blank because there is nothing to compare to. DaysBetweenDates =
🌐
Microsoft Fabric Community
community.fabric.microsoft.com › t5 › Desktop › IF-ISBLANK-Return-Blank › m-p › 538585
IF ISBLANK Return Blank - Microsoft Power BI Community
October 10, 2018 - Solved: Hi guys, Basically, if Date2 is blank then Age column should be blank because there is nothing to compare to. DaysBetweenDates =
🌐
Reddit
reddit.com › r/powerbi › calculated column, but don't calculate if a record is blank?
r/PowerBI on Reddit: Calculated Column, but don't calculate if a record is blank?
September 6, 2019 -

Hi all,

I'm trying to get a Network days style function working as part of an incident management report. The start date is always present, but the end date isn't always present, which is causing issues with the results.

What I want is to calculate only when the end date is populated. Otherwise ignore it.

Can anyone help with some simple suggestions? Thanks!

🌐
DAX Guide
dax.guide › isblank
ISBLANK – DAX Guide
1 week ago - This article explores the implications of having blank values in date columns and provides the best practices for managing them in DAX calculations and Power BI reports. » Read more ... 2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us » Privacy Policy & Cookies · Accept cookies to show this video. Cookies Policy Allow all cookies ... This function performs a Context Transition if called in a Row Context.
🌐
Microsoft Community
community.fabric.microsoft.com › t5 › Power-Query › Custom-Column-with-isblank-and-isnotblank › td-p › 2100262
Custom Column with isblank and isnotblank - Microsoft Fabric Community
September 29, 2021 - New Column = SWITCH ( TRUE (), [Column1] = BLANK () && [Column2] = BLANK (), "Outcome1", [Column1] <> BLANK () && [Column2] = BLANK (), "Outcome2", [Column2] <> BLANK (), "Outcome3" ) Best Regards, Eyelyn Qin If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. ... Here is a column expression that should work. ... Did I answer your question? Mark my post as a solution! Kudos are also appreciated! To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Find elsewhere
🌐
Microsoft Community
community.fabric.microsoft.com › t5 › Power-Query › Conditional-Column-to-check-If-Column-Blank-or-null-then-append › td-p › 1123080
Conditional Column to check If Column Blank or null then append or use non blank column
May 27, 2020 - Hi Expert I have three columns some of the columns have data, some have blanks and some are null What I am trying to do is create a conditional column in power query which will check column1, column2 & column3 and merge the data into another column It needs to ignore the blanks and null values and ...
🌐
SPGuides
spguides.com › add-column-if-blank-or-null-power-bi-power-query
Add a Column If Blank or Null in Power BI Power Query
November 27, 2025 - In the formula bar, add the following DAX expression: Status Check = IF( ISBLANK('CustomerDetails'[Phone Number]), "Not Provided", "Available" ) To check the result, go to the Table view and select the CustomerDetails table.
🌐
MrExcel
mrexcel.com › forums › question forums › power tools
If Not Blank AND If Blank Statement | MrExcel Message Board
January 30, 2024 - I've got 2 date fields and want to create a column from these. If the [Start Date] is NOT blank AND the [End Date] IS blank then return "Yes", else return "No". I've been googling like mad for 2 days, but no joy - so any help greatly...
🌐
Microsoft Learn
learn.microsoft.com › en-us › dax › isblank-function-dax
ISBLANK function (DAX) - DAX | Microsoft Learn
//Sales to Previous Year Ratio = IF( ISBLANK('CalculatedMeasures'[PreviousYearTotalSales]) , BLANK() , ( 'CalculatedMeasures'[Total Sales]-'CalculatedMeasures'[PreviousYearTotalSales] ) /'CalculatedMeasures'[PreviousYearTotalSales])
🌐
SPGuides
spguides.com › power-query-add-column-if-statement
Add Columns Using IF Statements in Power BI Power Query
November 28, 2025 - This Power BI tutorial explains how to work with Power Query Add column if statement, working with Power Query add column if blank, and much more.
🌐
Data Mozart
data-mozart.com › home › handling blank in power bi
Handling BLANK in Power BI - Data Mozart
July 26, 2021 - Basically, COALESCE will walk through the values passed as arguments and return the first non-blank value (not null in SQL). ... So, COALESCE will check column1, if the value is blank, it will go to check column2 value.
🌐
MrExcel
mrexcel.com › forums › question forums › power tools
If Function in Power Query and blank Cells | MrExcel Message Board
December 2, 2016 - In "M," how do I write an If function with a blank cell: =if [Country] = "" then [Location] else [Country] It is not working...probably having to do with testing if a cell is blank. Please help. Thank you!
🌐
Microsoft Community
community.fabric.microsoft.com › t5 › DAX-Commands-and-Tips › DAX-Column-use-another-value-if-field-is-blank › m-p › 2284885
Solved: DAX Column - use another value if field is blank - Microsoft Fabric Community
January 15, 2022 - Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher. ... I need a dax that unit the column Date 1 with Date 2 just if Date2 is empty. ... Thanks All. Solved! Go to Solution. ... If they're both from the same table, then there shouldn't be any problem writing a calculated column on that same table as I suggested and I don't know why you say you can't find them.
🌐
Reddit
reddit.com › r/powerbi › measure to return text if error or if blank?
r/PowerBI on Reddit: Measure to return text if error or if blank?
July 18, 2023 -

I use a measure to populate a card visual. Im calling out top 3 locations per another measure. and because you cant filter cards with a measure, I need to filter the measure.

=filter(all('table'[location], [rank measure]=1)

This works great for single results. But sometimes locations, because I am using SKIP in my ranking, I have multiples and some none at all.

Example of how my ranking looks:

LocationRank
A1
C1
F3
D4

So I have two 1st place and no second place. Thats the way I want the ranking to show. So my cards show an error for Rank 1 and BLANK for Rank 2.

I can do an IFERROR, which solves for errors, but not blanks. I can use ISBLANK() but then I will still get the error.

Is there any way to do this? I want the measure to return "Tie, See Table" if there is an error or the result is BLANK. I have tried nesting them both ways, but the error always wins out.