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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ACECEO
Regular Visitor

New to DAX - Question/Error Using Column Names

I am trying to write a bunch of DAX Code similar to what I do in Excel that if certain columns are blank, check other columns and/or substitute values. 

 

The probelm I have is referencing column names.

 

I can't seem to reference a colum name without getting an error. 

 

Just trying to perform the simple task below is erroring out. 

 

Test Measure = IF(ISBLANK([ColumName]), "This Is Blank", "This Is Not Blank")

 

In the example below I am trying to reference the column [Home_Address_Street] as shown but am getting error that the value cannot be determined. 

 

Looking further down at the next image, the column is present and it is literally blank. 

 

What am I doing wrong?

 

How do I make this work?

 

90% of my report consists of checking columns for values and doing things based on the result of the check. 

 

Any guidance or help would be greatly appreciated. 

 

FormulaZoomIn.png

 

 

 

PageWithColumns.png

 

1 ACCEPTED SOLUTION
Alex87
Solution Supplier
Solution Supplier

 

Hello,

Try this:

Measure = 
IF(MAX('YourTable'[Home_Address_Street])<> BLANK(), TRUE(), FALSE())
Test Measure = 
IF(
    ISBLANK(SELECTEDVALUE('TableName'[ColumnName])),
    "This Is Blank",
    "This Is Not Blank"
)

based on what you wrote you might be interested on reading about the COALESCE function.

 

If it answers your query, please mark my reply as the solution. Cheers


 

View solution in original post

1 REPLY 1
Alex87
Solution Supplier
Solution Supplier

 

Hello,

Try this:

Measure = 
IF(MAX('YourTable'[Home_Address_Street])<> BLANK(), TRUE(), FALSE())
Test Measure = 
IF(
    ISBLANK(SELECTEDVALUE('TableName'[ColumnName])),
    "This Is Blank",
    "This Is Not Blank"
)

based on what you wrote you might be interested on reading about the COALESCE function.

 

If it answers your query, please mark my reply as the solution. Cheers


 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors