Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am new to QlikView and I would appreciate some help considering expressions. I have three fields and every field had 2 expressions for its value. Is it possible to assign multiple expressions to one field?
For example: X=Y*Z and X=W-Y
I stored two of those formulas into variables and I have values $(X1) and $(X2). Is there a way I can assign both formulas to one field, so the field value is calculated based on both formulas?
I would really appreciate some help
Thank You!
I am not sure what you are trying to achieve. How would the two expressions work (ie which value would you use)?
A field value is one value, so how can you calculate it using two different expressions?
Are you thinking of doing this in the load script or the front end?
Try getcurrentselections() or getcurrentfield()
Just posted a sample here: Re: Using field value in table expression. Hope that helps.
I am trying to calcuate a field value so it is correct by watching any of two formulas. For example Y=100, Z=0,1 and W =110
X=Y*Z X=100*0,1=10
X=W-Y X=110-100=10
Is there a way I can make such double condition? I went through functions, but I´m not sure if it´s even possible to make such expression
It is not quite clear what you want, but if you want to display two outcomes for one field value you can e.g. use
='Count: $(X1) Sum: $(X2)'
Hi,
Try like this
LOAD
*,
Y*Z AS X1,
W-YAS X2
FROM DataSource;
Now simply use Sum(X1) or Sum(X2).
If not, come up with some sample data and your expected output.
Regards,
Jagan.
Can you post an example?
So my problem is the following. I have 4 fields. For example A, B, C, D. A is fixed value and B,C,D can be changed. When I change B... C and D should be updated. When I change C... B and D should be updated. And when I change D... B and C should be updated. Some sample data:
A | B | C | D |
100 | 10 | 0.1 | 110 |
100 | 20 | 0.2 | 120 |
100 | 30 | 0.3 | 130 |
B=A*C and B=D-A
C=B/A and C=((D/A)-1)
D=A+B and D=(A*C)+A
Every field should satisfy both conditions. I stored the formulas in variables and tried doing it with triggers, but for some reasons, triggers don´t work.
Hi,
How you will update B, C and D in front end?
Regards,
Jagan.