Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
=COUNTROWS(FILTER(VALUES(Table[Col]),CONTAINSSTRING(Table[Col]&",","Costar,")))
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 👍
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:
and so I would want a function that groups and sums these text values to have an output that would like like:
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 👍
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.
User | Count |
---|---|
9 | |
8 | |
6 | |
6 | |
6 |