Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Spiller
Contributor
Contributor

Set Analysis - how to make calculation based on on the value of one field

Hi all,

For a user story I need to measure if TaksX for the project has been completed on time or not. Currently it looks like below in set analysis. Only we have a new condition now where it should always check the BaselineDate and Delta for BaselineSource A first, when that source is available for project TaskX. If not then it should use the date and delta from source B for the calculation. How can i do that in an easy way?

Current script:

=Sum({<

TaskName = 'TaskX'
,BaselineName = 'BaselineX'
,BaselineDateCalendarYear = {'$(vF_CurrentYear)'}
,BaselineDate = {"<$(=Today())"}
,BaselineSource = {'A', 'B'}
>}
Aggr(If(Max({<

TaskName = 'TaskX'
,BaselineName = 'BaselineX'
,BaselineDateCalendarYear = {'$(vF_CurrentYear)'}
,BaselineDate = {"<$(=Today())"}
,BaselineSource = {'A', 'B'}
>} BaselineDelta ) <= Threshold
,1
), ProjectID)
)

Labels (2)
1 Reply
edwin
Specialist III
Specialist III

without knowing more details, i would say create a new field in your script where you check for those conditions.  that way you dont create nested if statements in your expressions.