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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Get count values for comma separated

Hi,

I have a table below. Tenant ID will always be unique. I need a measure for Incident Type, Priority, and Incident Root cause to get the result below.

 

Table :

Ashfiya_Naaz_0-1668746762809.png

 

Result expected :

Ashfiya_Naaz_1-1668746907879.png

 

Regards,
Ashfiya

 

 

 

6 REPLIES 6
FreemanZ
Super User
Super User

This shall be achieveable without any DAX code:
For the incidents by type table, create a table visual, put the [Incident Type] and [TelantID] to the Columns. Then you will get the expected result. 
 
It is similar to the other two tables. 
FreemanZ_0-1668748830575.png
Anonymous
Not applicable

Hi @FreemanZ ,

This will not work. I need count for every value present in Incident Type 
Ex: Near miss is present for all three tenant ID, so count of near miss should be 3.

Ashfiya_Naaz_0-1668750493944.png

 

Aha, then you need to split [Incident Type] column and duplicate the rest columns first in Power Query. For example, a row with 3 incident types, there will be 3 rows. 

Anonymous
Not applicable

I do not want to go with that approach since I will have 40 more comma-separated columns with different values.

So I need a calculated measure.
Thank You!

 

@amitchandak @Greg_Deckler @Jihwan_Kim  Please help

@Anonymous Assuming you have an Incidents type table somewhere you could do this:

Measure = 
  VAR __Type = MAX('Types'[Type])
  VAR __Table = 
    ADDCOLUMNS(
      'Table',
      "__Found",SEARCH(__Type,[Incident Type],,-1)
    )
  VAR __Result = COUNTROWS(FILTER(__Table, [__Found] > -1))
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler 
Thanks for the reply. I will not have an Incident Type table. My issue is there are more than 40 such columns, so having 40 tables will lower the performance.
Any different approach?

Note : using MongoDb as Datasource which is very very slow.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.