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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kmmqlick
Contributor III
Contributor III

Usage of Slider Object

Hi all,

I am having following fields Brand, Product, Max_pH and Min_pH. Each Brand having Min and Max pH values. Some brands having no pH values.

User wants a range slider object with pH value,  when he moves a slider he want to see no of Brands and No of Products with in this pH range.

case1: when no selections in Slider object, need to show all Brands and product (with  pH  and without pH)

case2: when we select range in Slider object, need to show brands and products with in that pH range.

I take expression like this

if($(vsliderMin)=Min(Min_pH) and $(vsliderMax)=Max(Max_pH),

count(distinct Brand),

count({< Min_pH = {">=$(vsliderMin"},Min_pH={" <=$(vsliderMax)"}>}distinct Brand))

The issue is when i select a brand from a brand filter with no pH values, not getting count of Brand and Product.

how to write that expression.Pic1.jpg

 

 

 

 

 

 

Labels (1)
1 Reply
rubenmarin

Hi, so the products with no Ph should be shown always? to do this you can add a new field to flag products with no pH, like: If(IsNull(pHField),0,1) as hasPh

And use this field in an expression like:

count({< Min_pH = {">=$(vsliderMin"},Min_pH={" <=$(vsliderMax)"}>+<hasPh={0}>}distinct Brand)