Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
qlikuser222
Contributor

Dynamic Count?

Hi Everyone,

 

I have a requirement here i have to show top 2 and bottom  5 dimensions in two separate tables but i also need to show the count of those dimensions in variables (should be dynamic).

 

Can anyone please help me to achieve this ?

 

PFA for example.

 

Thanks

Labels (4)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Dynamic Count?

Perhaps this: =rangemin(2, count(distinct MyDimension))


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
MVP & Luminary
MVP & Luminary

Re: Dynamic Count?

I'm afraid I don't understand. The top 2 is always 2 items. Why do you need a variable for that?

Or do you want to choose dynamically how many items should be shown in a Top X? In that use the variable for both purposes, to set the limit on the Dimension Limits tab and to show the limit value in the text object. Same for the Bottom Y.

You could use slider objects to allow the user to change the values of the variables.

You can find an example here: https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Slider-to-Display-Top-n-Entities/ta-p/...


talk is cheap, supply exceeds demand
qlikuser222
Contributor

Re: Dynamic Count?

Thanks for the reply,

 

I want to create a text box with a variable showing top 2 and other one with bottom 5 and they should be dynamic.

 

Thanks

MVP & Luminary
MVP & Luminary

Re: Dynamic Count?

Let's try that again. Please answer yes or no only to the following questions:
Should the text box show the number 2 when the table shows the Top 2?
Should the text box show the number 5 when the table shows the Top 5?
Should the user be able to change the value of the variable from one number to another number?

talk is cheap, supply exceeds demand
qlikuser222
Contributor

Re: Dynamic Count?

Should the text box show the number 2 when the table shows the Top 2? Yes
Should the text box show the number 5 when the table shows the Top 5? Yes
Should the user be able to change the value of the variable from one number to another number? If the user select just one dimension in the table then the variable value should show 1.

MVP & Luminary
MVP & Luminary

Re: Dynamic Count?

If the user select just one dimension in the table then the variable value should show 1.

Do you mean dimension value instead of dimension?

For example: Country is a dimension and France, Belgium and Ireland are dimension values of the Country dimension.

 

Perhaps you want your variable to count the dimension values: =count(distinct MyDimension)


talk is cheap, supply exceeds demand
qlikuser222
Contributor

Re: Dynamic Count?

Like without any selections the text box should show count of 2. ( Possible count of that dimension is 7).

 

Can we use rank or some function to achieve this?

MVP & Luminary
MVP & Luminary

Re: Dynamic Count?

Perhaps this: =rangemin(2, count(distinct MyDimension))


talk is cheap, supply exceeds demand

View solution in original post