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: 
Yogita
Contributor
Contributor

Calculate only when if condition is met.

Hi,

 

I am new to QlikView. Need some help here.

I am trying to create an expression with the below logic:

 =count({$<Difference_LastversusCurrent-={''}>}DISTINCT EEUserName)/count(TOTAL {$<Difference_LastversusCurrent-={''}>}DISTINCT(EEUserName)) 

The above logic should work only if CRating is not equal to zero. What should be the final expression be with the if condition.

 Thanks

Yogita

Labels (1)
1 Solution

Accepted Solutions
jduenyas
Specialist
Specialist

=IF(CRating<>0,count({$<Difference_LastversusCurrent-={''}>}DISTINCT EEUserName)/count(TOTAL {$<Difference_LastversusCurrent-={''}>}DISTINCT(EEUserName)) )

 

In QV there is not always a need to give the second option of an IF statement.

View solution in original post

2 Replies
jduenyas
Specialist
Specialist

=IF(CRating<>0,count({$<Difference_LastversusCurrent-={''}>}DISTINCT EEUserName)/count(TOTAL {$<Difference_LastversusCurrent-={''}>}DISTINCT(EEUserName)) )

 

In QV there is not always a need to give the second option of an IF statement.

Yogita
Contributor
Contributor
Author

Thank You !! This is working.