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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
TobyHowarth
New Member

DAX Integer Type Error

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")

)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@TobyHowarth,

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,

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@TobyHowarth,

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 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors