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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Thevarupan
New Member

Combining multiple column values ( multiple rows) into single column values (single row)

Combining multiple column values ( multiple rows) into single column values (single row) for SPECIFIC values only. 

I have developed a line chart with multiple fruit category (for example). The current table looks like this. 

Thevarupan_0-1714970643435.png


but as per business new requirement, we need to combine/group  fruit into certain categories. So that when they click the filter link the line chart the values shows the combination of different values. Something like below. 

Thevarupan_1-1714974602460.png

It doesnt matter if we can do it in the table or even in dax.. but user should be able to select Fruit2 Filter in the front end and the value should show as per the value2 above.

3 REPLIES 3
Thevarupan
New Member

hi @Anonymous , your solution is possible if table 2 exist. But in this case table 2 does not exist ( just an expected outcome). 

Thevarupan_0-1715067096579.png


Assuming i have this table in PBI, and i need an outcome so that in so called fruit2 column have combination of multiple fruits and also single fruits.

Anonymous
Not applicable

Hi @Thevarupan ,

 

So on what logic do you merge fruit2, please show your sample data and expected results.

 

Best regards,
Community Support Team_ Scott Chang

Anonymous
Not applicable

Hi @Thevarupan ,

 

I guess you want to filter the fruits by fruit2. you can check the result below:

vtianyichmsft_0-1715065510019.png

vtianyichmsft_1-1715065618034.png

Measure = var _s = SELECTEDVALUE('Table 2'[Fruit2])
RETURN IF(CONTAINSSTRING(_s,MAX('Table'[Fruit])),1,0)

 

Please feel free to correct me and provide more information if I have misunderstood you!

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.