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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
LK13
Contributor II
Contributor II

Apply action on Button with Variable Input

Hello,

I have defined a variable : vPercentPerVendor

I have placed a variable input with Input Box (so i can choose % from 0 - 100 (0.0 - 1))

I have placed a button and added action. Action is select value in the field (Field is dimension Vendor) with following expression: count(DISTINCT sale_service_id) / count( Total DISTINCT sale_service_id) > $(vPercentOfTotalPerVendor). 

Down below i have table with following fields: Vendor, Count (Distinct sale_service_id) and % of each Vendor in total count.

Idea is to represent vendors with 10 % or any higher % in relation to the total (which is 100 %).

I Attached SC.

Thank you in advance.

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@LK13  You can create calculated dimension for vendor as below. Then check suppress null value option for this calculated dimension

=aggr(if( 
count(DISTINCT sale_service_id) / count( Total DISTINCT sale_service_id) > $(vPercentOfTotalPerVendor),Vendor),
Vendor)

 

View solution in original post

5 Replies
Kushal_Chawda

@LK13  You can create calculated dimension for vendor as below. Then check suppress null value option for this calculated dimension

=aggr(if( 
count(DISTINCT sale_service_id) / count( Total DISTINCT sale_service_id) > $(vPercentOfTotalPerVendor),Vendor),
Vendor)

 

LK13
Contributor II
Contributor II
Author

Something is wrong, it just doesn't show the expected results. Maybe my approach via "select value in the field" is completely wrong, I'm not sure.

Anyway , thank you Kushal very much !

Kushal_Chawda

@LK13  Solution I provided is not button solution it is calculated dimension solution for vendor dimension?

LK13
Contributor II
Contributor II
Author

@Kushal_Chawda Actually you are absolutely correct. This approach work. I will just get rid of button and will leave only variable input. So yes calculated dimension will suppress null() and will work as expected.

Thank you. 

Kushal_Chawda

@LK13  Please accept the appropriate reply as solution if it helped.