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: 
Luben
Creator
Creator

If statement to Set Analysis

hello all i help looking at this if statement, I am trying to convert it to Set analysis.

 

COUNT(
distinct aggr (
IF (
(
[Open_Date]<=Vend_date
and Status<>'V'
AND Status<>'Void'
)
AND
(
[Closed_Date]>Vend_date
OR IsNull([Closed_Date])
)
,[C_Number]
)
,[C_Number]

 

Thanks for the feed backs

 

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

Sorry i was hoping you could cleanup any syntax issues as i dont have these fields.  i took a manual look through, try this, there was an extra ] in what i posted.:

 

count(distinct {<[C_Number] = {"=[Open_Date]<=[Vend_date]"}, [Status] -= {'V', 'Void'}> * <[C_Number] = {"=[Closed_Date]>[Vend_date] OR IsNull([Closed_Date])">} [C_Number])

View solution in original post

3 Replies
stevejoyce
Specialist II
Specialist II

Try this:

count(distinct {<[C_Number] = {"=[Open_Date]<=Vend_date"}, Status -= {'V', 'Void'}> * <[C_Number] = {"=[Closed_Date]>Vend_date OR IsNull([Closed_Date])"]>} [C_Number])

Luben
Creator
Creator
Author

Thanks for your response when I added the above I get error in the expression builder and the KPI is blank.

 

Thanks

stevejoyce
Specialist II
Specialist II

Sorry i was hoping you could cleanup any syntax issues as i dont have these fields.  i took a manual look through, try this, there was an extra ] in what i posted.:

 

count(distinct {<[C_Number] = {"=[Open_Date]<=[Vend_date]"}, [Status] -= {'V', 'Void'}> * <[C_Number] = {"=[Closed_Date]>[Vend_date] OR IsNull([Closed_Date])">} [C_Number])