Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculated value in set analysis

Hi,
I have the following expression.  Essentially, I am trying to limit the records to one record, based on the average daily volume.  The first example shows one department that has an average daily volume of 53.  however, this can change from month to month, or department to department .
sum ({$<AVG_DAILY_VOL_DESC ={'53)'}>} RESOURCING)
However, this can change from month to month, or department to department .  This doesnt work. However, the calculation does return the correct average daily volume.
sum({$<AVG_DAILY_VOL_DESC ={round(avg({$<MEASURES_DESC={'AVG DAILY VOL'}>}FORECAST_VALUE ))}>} RESOURCING)
So I put the calculation above into a variable called varADV and embedded that in the expression.  This doesnt work.
sum ({$<AVG_DAILY_VOL_DESC ={'$(varADV)'}>} RESOURCING)
What am I missing here?
1 Solution

Accepted Solutions
Not applicable
Author

The syntax for variables in set analysis is a bit different. You will need $(#variable) for variables and $(#=expression) for expression. So in your case use either

sum({$<AVG_DAILY_VOL_DESC ={$(=round(avg({$<MEASURES_DESC={'AVG DAILY VOL'}>}FORECAST_VALUE )))}>} RESOURCING)


or

sum ({$<AVG_DAILY_VOL_DESC ={$(=$(#varADV))}>} RESOURCING)


View solution in original post

1 Reply
Not applicable
Author

The syntax for variables in set analysis is a bit different. You will need $(#variable) for variables and $(#=expression) for expression. So in your case use either

sum({$<AVG_DAILY_VOL_DESC ={$(=round(avg({$<MEASURES_DESC={'AVG DAILY VOL'}>}FORECAST_VALUE )))}>} RESOURCING)


or

sum ({$<AVG_DAILY_VOL_DESC ={$(=$(#varADV))}>} RESOURCING)