Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |