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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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 @v-tianyich-msft , 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.

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

v-tianyich-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors