Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have one question about displaying dynamic calculation in the expression based on the values chosen from filters. For example:
Let's say I have one simple table which has simple multiplication calculation, e.g.
ID | Quantity | Total |
---|---|---|
1 | 100 | 200 |
1 | 200 | 400 |
3 | 300 | 600 |
Suppose I have list box with the following selections:
a
b
c
When:
- I select 'a' the quantity in the rows should be mutiplied by 2 (as shown in the table above)
- I select 'b' the quantity in the rows should be mutiplied by 2,5. So the 'Total' for the 3 rows in the table above will be 500, 1000 and 1500 respectively.
- I select 'c' the quantity in the should be mutiplied by 6. The 'Total' for the 3 rows in the table above will be 1200, 2400 and 3600 respectively.
Is there a simple way to do that? Is there away to assign static numbers to values in the filters and use them dynamically in the expressions?
Thanks.
I'm not sure if I understood your question. Please check the attached example to see if it helps.
Hi- I think one of the easiest ways to do this is to create a variable. The variable would be an expression, like below....
vMultiplier= IF(GetFieldSelections(List_Box Field)=a, 2,
IF(GetFieldSelections(List_Box Field)=b, 2.5,
IF(GetFieldSelections(List_Box Field)=c, 6,0)))
Then, I would write an expression for my total column like this...
=(FieldVlaue * vMultiplier)
This should allow you to have your dynamic multiplier based on a List Box selection, without having a large number of Conditional expressions to manage.
Hope this helps,
Nate
May be as below:
Thanks guys for your great help, exactly what I needed.