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

Using an Input box to show comparitive period

Hi,

I'm trying to use an input box to force a period (1 through 12) into an expression in order to show a comparitive period, regardless of what period is otherwise selected.

My Input Box Variable is called:  PVar

The expression i'm attempting to use is:

Sum({$<[Period]={$(=Only([PVar]))}>}[Equivalent Units])  

Any Idea what I'm doing wrong?

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

When using a variable in set analysis you don't need to use the Only() function because the variable contains only one value, so the expression should be:

Sum({$<[Period]={$(PVar)}>} [Equivalent Units]) 

Regards!

View solution in original post

2 Replies
Not applicable
Author

Hi,

When using a variable in set analysis you don't need to use the Only() function because the variable contains only one value, so the expression should be:

Sum({$<[Period]={$(PVar)}>} [Equivalent Units]) 

Regards!

Not applicable
Author

Thank you Gabriela, Works perfectly.

Now I would like to add that expression to the below expression which shows our previous fiscal year (our fiscal years are in the 2010-2011 format).

Sum({$<[Fiscal Year]={"$(=Only((SubField([Fiscal Year],'-',1) - 1) & '-' & (SubField([Fiscal Year],'-',2) - 1) ))"}>} [Equivalent Units] )

Any help?