Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis and if condition

I am not getting correct data for below expression. Any help will be appreciated.

Expression:

 

=if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Open' or WORKOUTACTION.WORKOUTACTIONSTATUSDrop='InProgress',count     ({$<Year=,Quarter=,Month=,Day=>}distinct WORKOUTACTION.ACTIONID),
if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Closed',count(distinct WORKOUTACTION.ACTIONID)))

Dimension 1:

 

=WORKOUTACTION.TYPE

Dimension 2:

 

=if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Open' or WORKOUTACTION.WORKOUTACTIONSTATUSDrop='InProgress','Open',
      if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Closed','Closed'))

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks in advance..

Regards,

Ankita

6 Replies
CELAMBARASAN

Hi,

Here you can simply use count({$<Year=,Quarter=,Month=,Day=>} distinct WORKOUTACTION.ACTIONID)

and analyse whether action id is same. if it is same it returns 1.

Not applicable

try

=if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Open' or WORKOUTACTION.WORKOUTACTIONSTATUSDrop='InProgress', if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop<>'Closed',count     ({$<Year=,Quarter=,Month=,Day=>}distinctWORKOUTACTION.ACTIONID),count(distinct WORKOUTACTION.ACTIONID)))




,

Not applicable

No, on using this expression, chart is not showing any data.

tresesco
MVP
MVP

Please share a sample app. If you are worried about data and all see How to Prepare Sample File to Upload

Not applicable

I think there is some error with the dimension because of which I am not getting 'Open' status count correct.

Please give some alternate solution..

below is the dimension:

=if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Open' or WORKOUTACTION.WORKOUTACTIONSTATUSDrop='InProgress','Open',
      if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Closed','Closed'))

Not applicable

could you share your qvw file?

another thing.. If your status is open or inprogress then its open...... But when not it should be closed?

why not just do like this then

=if(WORKOUTACTION.WORKOUTACTIONSTATUSDrop='Open' orWORKOUTACTION.WORKOUTACTIONSTATUSDrop='InProgress','Open','Closed')