Forum Discussion

Kamai's avatar
Kamai
New Member
1 year ago
Solved

More than one ID per cell

Hi there, I`m quite new to power BI. The internet doesn`t help, so I ended here 😉 I have a file with diffrent releations. Lets call it customers and Products. We use power BI as some kind of sort...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Kamai ,

    Based on the testing, transform the relation table data. Select split column by delimiter.

    Unpivot only selected columns.

    Rename the column name.

    Remove Attribute column.

    Select close and apply.

    Then, creating the new measure to filter the product based on customer.

    Measure = 
    var _customer = SELECTEDVALUE('Relation Table'[Customer_ID])
    var _product = SELECTEDVALUE('Product'[Product ID])
    var _result = CALCULATE(MAX('Relation Table'[Product_Name]), FILTER('Relation Table', 'Relation Table'[Customer_ID] = _customer))
    RETURN
    IF(_product = _result, 1, 0)

    Drag the measure to the table visual Filters pane and set show item is 1.

    Select the customer ID. The result is shown below.

    Best Regards,

    Wisdom Wu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.