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: 
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
Partner - Champion
Partner - Champion

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
Author

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
Author

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
Author

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
Author

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')