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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a List Box Selection is an Expression

I am trying to have a list box select (percent probability to close) and would like to have the below formula reference a selected range rather than it being hard coded.

sum({ $<Forecast_CloseDate={'05-2011'}, Forecast_Probability ={'>70<100'}>} ForecastOppAmount)

Any and all ideas would be helpful

Thanx

10 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

where do you use this expression? Is Forecast_CloseDate really a string? otherwise you have to use a number like: Num(Monthname(Datefield)) As Num_Forecast_CloseDate

and the expression p.e.:

Let variable = Num(Makedate(2011,5,1));

sum({ $<Num_Forecast_CloseDate={$(variable)}, Forecast_Probability ={'>70<100'}>} ForecastOppAmount)

Not applicable
Author

Hi Martina,

Forecast_Claose Date is a date field. What I would like to relace is the Forecast_Probability with a manually selectable something(inputbox, list box etc) but cant figure out how to make the probability dynamic

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Allen,

I do not yet understand, what do you want. If you want to get a listbox to select some values calculated by conditions it is better to do this in the script, something like:

Load ...,

     if(MonthName(Forecast_CloseDate)=Monthname(Makedate(2011,5,1) And

     Forecast_Probability>=70 And Forecast_Probability<=100,'Select','Unselect') As Fieldname,

     ...

From ...;

Than you have Fieldname for using a listbox.

Greetings from Munich

Not applicable
Author

The formla works perfectly....what I would like, is for my end user to be able to alter the probability percent range. Currently, the probability is hard coded into the expression which the end user cant change. So basically, I would liek to create a variable that I could use in the expression in place of teh probability, where the user can select their deaired range.

Sorry if this is unclear....as you can see Im struggling as well.

sum({ $<Forecast_CloseDate={'05-2011'}, Forecast_Probability ={'>70<100'}>} ForecastOppAmount)

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Allen,

use variables for the margins and a Slider with two variables

Var1: 70

Var2: 100

Not applicable
Author

Martina,

I like the solution, but for the life of me I cannot get the slider to produce two variables a max and min....am I doing something wrong?

I tried the slider relating to variables and directly to the field...nothing works

Not applicable
Author

Actually, is there a way through input boxes where the enduser can control the probability range? and if so how is the expression written?

Not applicable
Author

Or...is there a way to formulariclly write an expression to reference selection from a list box?

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Allen,

can you send me an example?