Forum Discussion
Nick_2510
Helper I
4 years agocount all negative numbers
I want to count all negative numbers by rows and in total...but it doesn't work in total M = SUMX ( VALUES ( Data[Name] ), IF ( [diff_AvSal_bal] < -1, 1, 0))
tamerj1
Community Champion
4 years agoMaybe you mean "AND" not "OR". Please try replace || with &&
Nick_2510
Helper I
4 years agotamerj1
No, I mean put 0 if name on this day is in delist OR diff_AvSal_bal > 0...but it takes 1...I tried to reverse conditions and got error
OOS =
SUMX (
CROSSJOIN ( VALUES ('Календарь'[Date]), VALUES ( Glossary[Name] ) ),
IF ('Календарь'[Date] IN
CALENDAR (
CALCULATE ( SELECTEDVALUE ( delist[Start_per] ) ),
CALCULATE ( SELECTEDVALUE ( delist[End_per] ) )
||
[diff_AvSal_bal] > 0
),
0, 1 )
)
Calendar start date or end date cannot be null