Forum Discussion
TechR21
Helper V
3 years ago"AND" statement DAX
Hi , Im trying to have a column containing either 1 or 0 depending on following condition in DAX: "OpenIncident", IF ( AND( CALCULATE ( COUNTROWS ( 'tableA' ), ...
- 3 years ago
Hello,
"OpenIncident", IF ( AND(CALCULATE (COUNTROWS ( 'tableA' ),ALLEXCEPT ('tableA','tableA'[SubGroup],'tableA'[incidentNumber]),'tableA'[Change Status] in {"Logged", "Waiting", "Updated"}),CALCULATE (COUNTROWS ( 'tableA' ),ALLEXCEPT ('tableA','tableA'[SubGroup],'tableA'[incidentNumber]),'tableA'[Status Name] in {"Logged", "Updated","In progress"})) ,-- This will giving you true/ flase in output and here you are trying to compare with like (True/false)>0. this will not work.1,0)try this it will work for you I think so.thanks.
Shubham_Tekade
3 years agoFrequent Visitor
Hello,
"OpenIncident", IF ( AND(
CALCULATE (
COUNTROWS ( 'tableA' ),
ALLEXCEPT (
'tableA',
'tableA'[SubGroup],
'tableA'[incidentNumber]
),
'tableA'[Change Status] in {"Logged", "Waiting", "Updated"})
,
CALCULATE (
COUNTROWS ( 'tableA' ),
ALLEXCEPT (
'tableA',
'tableA'[SubGroup],
'tableA'[incidentNumber]
),
'tableA'[Status Name] in {"Logged", "Updated","In progress"})
) ,-- This will giving you true/ flase in output and here you are trying to compare with like (True/false)>0. this will not work.
1,
0
)
try this it will work for you I think so.
thanks.
- TechR213 years ago
Helper V
yes this works. After reading the error again I figured something with the last part should be wrong. thank you