Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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
Highlighted
Contributor III
Contributor III

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
Highlighted
Contributor III
Contributor III

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.

Highlighted
Creator
Creator

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

Highlighted
Contributor III
Contributor III

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