DAX - IF lookup value empty return column value
i think that you have created a relation between name.tableA and name.TableB. You can Create a calculated column on TABLEA using related(Type.TableB).
At this point if you have a relation between the table in new column on TableA you have some row blank and some row with the TYpe.TableB. If it's working change the column formula with
=if(ISBLANK(related('TableB'[Type]));'tableA'[name];related('TableB'[Type]))
If there isn't a connection between table you should change related with Lookup.
Admin
Updated on June 14, 2022Comments
-
Admin almost 2 years
I'm using Power Pivot 2013, I have two table.
(fact)Table A: Name and Value (dim) Table B: Name and Type
When selecting pivottable, I want to show Type and Value but if Name.TableA can't be found in Name.TableB, instead of returning (blank) i want pivottable to return Name.TableA. I have tried VALUES() IF(VALUES) with no success.
Thank you in advance.
-
GregGalloway about 8 yearsIs that DAX? The syntax doesn't look valid.
-
nicolò grando about 8 yearsit is an example of structure: =if(ISBLANK(related('TableB'[Type]));'tableA'[name];related('TableB'[Type]))
-
GregGalloway about 8 yearsbut your code in your answer is different and had . not [] so please update your answer.