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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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 carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors