Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
Yogita
Not applicable

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
Not applicable

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
Not applicable

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
Not applicable

Re: Calculate only when if condition is met.

Thank You !! This is working.