Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have an excel table with a column for 'outcomes'. Users are able to add several outcomes, separated by commas.
I have created a table in PBI which is just the possible 'outcomes' from the file.
I'm trying to find a way to count how many rows contain each of the 'outcomes'. So if the column had 5 outcomes, separated by columns, there would be a count of 1 for each of the 5 relevant outcomes.
Hi @Back2Basics,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi,
In the Query Editor, you should split the outcome by rows to allow each outcome to appear in its own cell. Now create your desired visual. You may need to write a DISTINCTCOUNT() measure.
Hi @Back2Basics,
Perhaps you can try to use the following formula to expand these values, then you can use countrows function to get the item count in your field:
Column item Count=
VAR _path =
SUBSTITUTE (
CONCATENATEX ( VALUES ( 'Table'[Column] ), [Column], "," ),
",",
"|"
)
VAR _length =
PATHLENGTH ( _path )
VAR _pathtable =
ADDCOLUMNS (
GENERATESERIES ( 1, _length, 1 ),
"Column", PATHITEM ( _path, [Value] )
)
RETURN
COUNTROWS ( _pathtable )
Regards,
Xiaoxin Sheng
@Back2Basics I've generally done it this way:
New Column = LEN('Table'[Column]) - LEN(SUBSTITUTE('Table'[Column],",","")) + 1
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |