I must have fallen asleep in DAX 101, but I have a tough time testing for RELATED() values that aren't there.
Example: We order products that may be substituted by our vendor. We subsequently have to revise our PO to change from the vendor item ID in our item master to the one provided by our vendor. We retain our internal PeopleSoft number "PS ID" regardless of the item. Not all orders ("scripted") have PeopleSoft numbers/items in our item master however. Therefore I would like to return 3 values into a "Sub" column of our Orders table:
"Scripted" - no matching value found in our item master.
"Sub" = Orders[Vendor ID] <> RELATED('Item Master'[Supplier ID']
"Base" = Orders[Vendor ID] = RELATED('Item Master'[Supplier ID']
the item master table has a relationship via the [PS ID] field to the Orders table.
I'm not clear on whether I test for BLANK() or null string for the Scripted response, or if I have to do a FILTER statement somewhere.
Example: We order products that may be substituted by our vendor. We subsequently have to revise our PO to change from the vendor item ID in our item master to the one provided by our vendor. We retain our internal PeopleSoft number "PS ID" regardless of the item. Not all orders ("scripted") have PeopleSoft numbers/items in our item master however. Therefore I would like to return 3 values into a "Sub" column of our Orders table:
"Scripted" - no matching value found in our item master.
"Sub" = Orders[Vendor ID] <> RELATED('Item Master'[Supplier ID']
"Base" = Orders[Vendor ID] = RELATED('Item Master'[Supplier ID']
the item master table has a relationship via the [PS ID] field to the Orders table.
I'm not clear on whether I test for BLANK() or null string for the Scripted response, or if I have to do a FILTER statement somewhere.
Last edited: