Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

countif

Hi First I want to say thank you for all the help people are on this site,

can somebody explain where im going wrong in this expression?

if( [Fault Status]={HARD} count( [Fault Detected]) - count ({$< [Fault Cleared] = {"<=$(=Max([Date Detected]))"}>} [Fault Cleared] )

the 2 count expressions work fine its the if statement that is an issue, or maybe how im combining the two,

its supposed to say if Fault status = HARD do the following expression

2 Replies
christophebrault
Specialist
Specialist

I supose you want to do this :

if( [Fault Status]='HARD', count( [Fault Detected]) - count ({$< [Date Detected] = {"<=$(=Max([Date Detected]))"}>} [Fault Cleared] ))

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
swuehl
MVP
MVP

Fault Status must have an unambiguous value in the scope of the expression to work (like Fault Status as dimension for the expression), then just try

if( [Fault Status]='HARD' ,

     count( [Fault Detected] ) - count ({$< [Fault Cleared] = {"<=$(=Max([Date Detected]))"}>} [Fault Cleared] )

)