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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi there,
Please could I ask for some help with a count? I need to perform a really simple count of text values in a range. E.g. I have a column in a dataset called 'Category', this is a text value. I need to calculate a count of all the items in my dataset that contain one of the values in the list below. However, when I use the DAX below, the code runs but I get an error as seen below when I try to use the measure. I don't understand this error as I'm not trying to compare values, just count where text appears in the string:
DAX
Security Incidents = CALCULATE(COUNT('All EV Incidents'[Category]) IN {
Solved! Go to Solution.
Try this measure:
Security Incidents =
CALCULATE (
COUNT ( 'All EV Incidents'[Category] ),
'All EV Incidents'[Category]
IN {
"Audits",
"Qualys",
"Branch Raid",
"Data Loss",
"Denial of Service",
"Internal threat",
"Lost or Stolen device",
"Malware",
"PCI",
"Ransomware",
"Security-Other",
"Third Party Supplier",
"Website Exploit",
"Pen Testing",
"SecHQ",
"Threat Intelligence"
}
)
Proud to be a Super User!
Try this measure:
Security Incidents =
CALCULATE (
COUNT ( 'All EV Incidents'[Category] ),
'All EV Incidents'[Category]
IN {
"Audits",
"Qualys",
"Branch Raid",
"Data Loss",
"Denial of Service",
"Internal threat",
"Lost or Stolen device",
"Malware",
"PCI",
"Ransomware",
"Security-Other",
"Third Party Supplier",
"Website Exploit",
"Pen Testing",
"SecHQ",
"Threat Intelligence"
}
)
Proud to be a Super User!
Thanks @DataInsights. I can see what I did wrong, I messed up the syntax in the COUNT section by not including the second 'All EV Incidents'[Category]) line. Thanks again for the help.