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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
twanqlik
Creator II
Creator II

Variable dimensions in a table

I'm trying to create a table with 3 columns:

1. Expression 1 --> =Count (ID) Where Month = User selection

2. Expression 2 --> =Count (ID) Where Month = User selection

3. Result --> =Expression 1 - Expression 2

Month in table 1 and table 2 are variable and should be selected by the user.

The goal is that the user can decide which months he wants to compare.

Any tips how to build this?

1 Solution

Accepted Solutions
Anonymous
Not applicable

You got to assign the value of the variable to your expression.

Hope the attached app helps you.

The attached example does the following:

Expression 1 --> COUNT({<$(vTest)>}Quarter)

Expression 2 --> COUNT({<$(vTest2)>}Quarter)

Change it as per your need.

View solution in original post

3 Replies
Anonymous
Not applicable

Try this project: It will help you play with variables: http://branch.qlik.com/#!/project/56728f52d1e497241ae697f8

Create 2 variables with monthName for each expressions and give buttons (or anything else)

Let us assume the variables are as follows:

vExp1 --> Default value - 'Apr'

vExp2 --> Default vale - 'May'

Expression 1 --> COUNT({<$(vExp1)>}ID)

Expression 2 --> COUNT({<$(vExp2)>}ID)

Result = Expression1 - Expression 2

Let me know if this helps.

Also check out : https://community.qlik.com/docs/DOC-17359

This will guide you on how to use the extension.

twanqlik
Creator II
Creator II
Author

I installed the Variable extension but it seems not to do much here.

I created a Variable and linked it to 1 field, however, when i click on the variable in the App nothing happens. I expected a list with values that I can select.

What am I doing wrong?

I added my .qvf

Anonymous
Not applicable

You got to assign the value of the variable to your expression.

Hope the attached app helps you.

The attached example does the following:

Expression 1 --> COUNT({<$(vTest)>}Quarter)

Expression 2 --> COUNT({<$(vTest2)>}Quarter)

Change it as per your need.