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.
Ah right. I don't know how to do that haha. I want a table with a column that shows amounts of 'Actual Harm' values. So, for instance, if there were 5 in October and none in November, my current table says "Oct - 5, Nov - Blank" because the contitional column is 1 and null. I'm not sure how to write a COUNTROWS and FILTER where it's differentiating the 1 and null rows, and then turning the nulls into zeroes.
- danextian1 year ago
Super User
In the below example, I am using a date column from a separate date dimension. Those with sum of sales are the dates present in the fact table but since i am using a separate dates table, I can assign a value to its rows even if they don't exist in the fact table.