Forum Discussion
The syntax for 'RETURN' is incorrect
- 1 year ago
I don't see anything wrong with your formula. But the RETURN clause can simplified as _CountActualHarm + 0.
Now this may not return 0 if for example you are trying to return it for October but there's no October row 5 in your table and you're using the date column from the same table. Simply put, you cant assign a value to a row that doesn't exist, 0 or not. This why it is important to use separate date/calendar table with a complete set of dates whether they exist in your fact table or not.
Hi AC23VM ,
Your DAX formula syntax looks correct, and based on what you shared, the error likely originates elsewhere in the data model or specific column
1. Verify Column Name : Ensure that the column name is correct and matches exactly as it appears in the data model
2. Replace COUNT with SUM or SUMX for Numeric Columns
If Grading - Actual Harm contains 1 and BLANK values:
COUNT counts all non-blank rows.
If you want to treat 1 as the actual value and replace blanks with 0, you may need to aggregate it differently.
3.Use COUNTROWS with FILTER if conditions are involved.
I hope the provided solution works for you
If I have resolved your question, please consider marking my post as a solution. Thank you!
A kudos is always appreciated—it helps acknowledge the effort and keeps the community thriving.