Forum Discussion
Anonymous
3 years agoNot applicable
Sum the line items based on condition
Hi everyone, I'm trying to write a formula for the conditions below. Someone please help me write a code for the condition. Here for the number of days, I'm want to calculate no of days based...
- 3 years ago
Try
Total Days = SUMX ( 'Table', IF ( 'Table'[Hours] > 0, 1 ) )
Anonymous
3 years agoNot applicable
So we should not create measure for such a case?
johnt75
3 years agoSuper User
I wouldn't, no. A measure is typically an aggregation of a value, e.g. the sum or the average. You can't aggregate a country, and typically you would want to use such a thing to slice or filter some measures. Better to have something like that in a column.