Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Yogita
New 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
Contributor III

Re: Calculate only when if condition is met.

=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.

2 Replies
jduenyas
Contributor III

Re: Calculate only when if condition is met.

=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
New Contributor

Re: Calculate only when if condition is met.

Thank You !! This is working.