Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
I am still fairly fresh in my time with Power BI but I have come across a stranger Error.
I am trying to do a basic measure to count if a column has a certain value. Both values are Whole numbers (right aligned in the query) and the measure says the calculation is ok.
However Power B is throwing up an error regarding varying data types and text. This is strange because as above the values are both whole numbers.
It is probably a rookie error and I have looked through the help but can not seem to find a resolution that fits the issue.
RIDDORS =
CALCULATE(
COUNTA(
search_Incident_StatusFlags[ValueID]),
FILTER(
search_Incident_StatusFlags,
search_Incident_StatusFlags[ValueID]="24")
)
Solved! Go to Solution.
Remove double quotes around 24, and use the following DAX to create the measure instead. Double quotes are only required when you set data type of ValueID column to text.
RIDDORS = CALCULATE( COUNTA( search_Incident_StatusFlags[ValueID]), FILTER( search_Incident_StatusFlags, search_Incident_StatusFlags[ValueID]=24) )
Regards,
Remove double quotes around 24, and use the following DAX to create the measure instead. Double quotes are only required when you set data type of ValueID column to text.
RIDDORS = CALCULATE( COUNTA( search_Incident_StatusFlags[ValueID]), FILTER( search_Incident_StatusFlags, search_Incident_StatusFlags[ValueID]=24) )
Regards,
Thank you very much! so simple when you explained it, I need to go and do some more reading.
Thank you again 🙂
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.