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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
FaH
New Member

Extracted data (from list) with separator; representation in diagrams

Hi,

 

I have data coming in via API which has a List field included (let's say we have 5 options A - E), which can be transformed (values extracted) and I can choose the separator for the concatenation. Obviously, I end up with different combinations and what I'd like to do is get a diagram, which shows me the occurence of A, B, C, D and E, independently. Counting the appearance three cases of B,C as three cases for B and three cases for C instead of creating a new subgroup for this (as it is currently looking):

 

example.png

 

Sorry for the stupid explanation but I I guess my lack of the proper terminology is the main reason I was unable to find something in the PowerBI documentation.

1 ACCEPTED SOLUTION

Hi @FaH 

 

One option is to use Power Query Editor to split Countries column by delimiter comma into rows. Then create a pie chart based on the transformed table. 

vjingzhang_0-1666079863982.png

vjingzhang_1-1666080029270.png

 

Another option is to prepare a Country table which has all distinct country values in advance. Then add a new column in it with below DAX. 

Number = COUNTROWS(FILTER('Table (2)',SEARCH('Country'[Country],'Table (2)'[Countries],1,0)>0))

vjingzhang_2-1666080219798.png

vjingzhang_3-1666080729015.png

 

I have attached a sample pbix with both demos at bottom. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
FaH
New Member

Thanks for your reply.

ItemCountriesStatus
ShoesAustriaDone
SuitAustria,DenmarkDone
JacketChileIn progress
GlassesEstoniaTodo
SneakersDenmark,BelizeIn progress
TrousersBelizeIn progress
SunglassesAustriaTodo
Bag 1Denmark,Austria,EstoniaDone
Bag 2DenmarkDone

 

Let me try to explain with this example. The column Countries may have several Countries referring to a specific Item. The countries are separated by commas (but that can be changed). I want to visualize the distribution of countries (%) in a pie chart. In Excel, I would for example use the COUNTIF(B2:B10;"*Austria*") function, to get a result of 4 (marked in green). Same then for all other countries (Denmark 4, Belize 2, Chile 1, Estonia 2) and then I can easily create a pie chart from the resulting numbers:

bi_example3.png

 

Simply speaking, I need a way to adopt the COUNTIF function in PowerBI or find an equal way to . 

 

I can also look if I can create a dummy .pbix without sensitive information if my table example does not help.

Thanks!

Hi @FaH 

 

One option is to use Power Query Editor to split Countries column by delimiter comma into rows. Then create a pie chart based on the transformed table. 

vjingzhang_0-1666079863982.png

vjingzhang_1-1666080029270.png

 

Another option is to prepare a Country table which has all distinct country values in advance. Then add a new column in it with below DAX. 

Number = COUNTROWS(FILTER('Table (2)',SEARCH('Country'[Country],'Table (2)'[Countries],1,0)>0))

vjingzhang_2-1666080219798.png

vjingzhang_3-1666080729015.png

 

I have attached a sample pbix with both demos at bottom. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@FaH , Not very clear. You can use split by delimiters in Power Query into rows

 

https://www.youtube.com/watch?v=Jv1GQM3QwMY

 

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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