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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RolandPlanet
Frequent Visitor

Get Counts of Items across columns

I have data structured like this:

IDItem1Item2Item3
1appleorangepear
2applegrapepear
3orangebananapear

 

What I'm trying to do is display data in a visual that's a count of the items across all three columns. In other words, I'd like it to display the data like: 

pear - 3

apple - 2

orange - 2

grape - 1

banana - 1

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@RolandPlanet ,

 

In query editor, click on column [Item1], [Item2] and [Item3] then click Transform-> Unpivot Columns. Then in transform pane, click group by like below:

1.PNG 

 

The result is as below:

2.PNG 

 

Community Support Team _ Jimmy Tao

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
v-yuta-msft
Community Support
Community Support

@RolandPlanet ,

 

In query editor, click on column [Item1], [Item2] and [Item3] then click Transform-> Unpivot Columns. Then in transform pane, click group by like below:

1.PNG 

 

The result is as below:

2.PNG 

 

Community Support Team _ Jimmy Tao

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

camargos88
Community Champion
Community Champion

Hi @RolandPlanet ,

 

You just need to unpivot the item columns.

 

Check this file as an example: Download PBIX 

 

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.