Forum Discussion

juncco888's avatar
juncco888
Icon for Advocate I rankAdvocate I
5 years ago
Solved

Pass a value from one table to select that value from multiple columns in another table

Hi there, I am new to Power Bi and DAX and am having difficulty selecting and displaying records based on a single value that exists in multiple columns in my data set.  I want to select a value for ...
  • AllisonKennedy's avatar
    5 years ago

    juncco888 In this case you don't want/need ANY relationship between the CustomerID table and Sales table. 

     

    Create a measure: 

    Selected Customer Sales =

    SUMX(

    FILTER(Sales,

    Sales[ShipTo] IN VALUES(CustID[CustID])

    || Sales[SoldTo] IN VALUES(CustID[CustID])

    || Sales[EndCust] IN VALUES(CustID[CustID])

    ), Sales[Amount])