Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Kamai
New Member

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 sorting tool. thare are not much changes but it gives us a nice overview.

 

We want to see which customer gets which product.

I have a table with the products, a table with customers and a table for the releation between the two.

 

Product looks like:

 

Product IDProduct_NameProdct_SubnameData1Data2
BiBillirubinControl 1set1set2
TNTroponinControl1set1set2

 

Customer looks like

CustmerIDNameLastnamestreetCityState
1SimonMulerStreet 1LondonUK
2SusanneSaltStreet 2HamburgDE


The relation looks like:

Product_NameCustomer_ID
Bi1; 3; 10
TN2

 

This is an example.

The Product ID isnot be uniq! I have an:m relation here wich qorks fine!

My problem is the relation table with more than one data set in one cell.

I can`t split the coloum in power BI, if I do, I can make only one relation to the customer table.

On the other hand power BI can`t sort the data correctly if more than one set is in the cell.

 

We have just startet our little project and jet we don`t have too many items listed, so we can still change some things.

 

Any help / advise?

 

Many thanks in advanced.

 

BR

Kamai

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Kamai ,

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

vjiewumsft_0-1736907208139.png

vjiewumsft_1-1736907218067.png

Unpivot only selected columns.

vjiewumsft_2-1736907224486.png

Rename the column name.

vjiewumsft_3-1736907231461.png

Remove Attribute column.

vjiewumsft_4-1736907238078.png

Select close and apply.

vjiewumsft_5-1736907244343.png

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.

vjiewumsft_6-1736907338876.png

Select the customer ID. The result is shown below.

vjiewumsft_7-1736907385420.png

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.

View solution in original post

2 REPLIES 2
Kamai
New Member

Hi Wisdom,

thanks for your quick help!

 

Could use it  directly!

 

Thanks!


BR
Kamai

Anonymous
Not applicable

Hi @Kamai ,

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

vjiewumsft_0-1736907208139.png

vjiewumsft_1-1736907218067.png

Unpivot only selected columns.

vjiewumsft_2-1736907224486.png

Rename the column name.

vjiewumsft_3-1736907231461.png

Remove Attribute column.

vjiewumsft_4-1736907238078.png

Select close and apply.

vjiewumsft_5-1736907244343.png

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.

vjiewumsft_6-1736907338876.png

Select the customer ID. The result is shown below.

vjiewumsft_7-1736907385420.png

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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors