Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Solved! Go to Solution.
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
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