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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
grantgripPBI
New Member

Looking for a way to count all values within a column that has multiple text options

grantgripPBI_0-1675322495263.png

 

So an example is provided above of what a group by function looks like.

 

The data set basically asks the user "select 1 of these options and any that apply", due to this it created a data set with all of these values segregated into multiple columns which I grouped into 1 column using a text join.

 

I'm wondering how I can create a measure that counts the total # of each values selected. For instance if costar was selected 50 times alone, but then costar and other values were selected it would add up the total number of costar and output it and this goes for all values. So for instance lets say costar was selected 50 by it's self but then was also present in 200 other responses the new measure/value would show it at 250, and this would apply to all values within the column.

 

I can use a data set where the all the values are merged into one column or another data set where each individual value is separated. 

 

5 REPLIES 5
wdx223_Daniel
Super User
Super User

=COUNTROWS(FILTER(VALUES(Table[Col]),CONTAINSSTRING(Table[Col]&",","Costar,")))

Idrissshatila
Super User
Super User

Hello @grantgripPBI ,

 

If you mean you want a measure that sums the values so you could view them per each text, it would be

Measure = sum('Table'[value column])
so after the sum you put your value column.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Sorry I'm confused by this answer.

 

I don't want to just sum the column. Let me try to clarify. The user has 10 options they can select but multiple groupings happen for instances. Lets put this into fruit so it makes it easier.

 

Lets say the question is: what fruit do you like? 

 

There is 4 options:

apple

oranges

strawberries

blueberries

 

User A selects only oranges

User B selects oranges and apples

User c selects apples only

 

Currently how the column is configured it woould look like the following:

grantgripPBI_0-1675326334822.png

 and so I would want a function that groups and sums these text values to have an output that would like like:

 

grantgripPBI_1-1675326360244.png

 

Hello @grantgripPBI ,

 

Yes the measure i provided would give the sum of the selected texts.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Sorry maybe I'm misterpeting the solution but that just sums the column which doesn't seem to work.

 

For instance lets say the table is "sheet1" and the column is PQ27.

 

The formula would be Measure=su(Sheet1[PQ27])) correct? If so that doesnt work.

 

grantgripPBI_0-1675379002688.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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