Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do i write the following statement in set analysis?
[College]<>0 or [University]<>0
[College]<>0
is
[College]-={0}
in set analysis. But how about 2 fields using the OR statement to be equal to 0. I am new here and appreciate the help. Thanks.
try this:
{<College-={'0'}> + <University-={'0'}>}
Hi,
Try this one
count({$<College-={"=len(trim(College))=0"}>+<University-={"=len(trim(University))=0"}>} id_user)
This will work
Script:
LOAD * INLINE [
Name, College, University, Value
A, a, b, 100
B, a, 0, 220
C, 0, b, 443
D, a, b, 342
E,0,0,4545
];
sum({<College-={0},University-={0}>}Value)
Result is
Name Value
A 100
D 342
If you want to use an operator then the below expression will give you the same result as above :
sum({<College-={0}>*<University-={0}>}Value)
Here is how I solved it. Instead of using the OR operator between the fields, I put the individual fields in the formula, replicated it and put OR in between the formulas.
Here is an example:
<formula
,[College]-={0}
formula>
+
<formula
,[University]-={0}
formula>
The Qlikview syntax checking mechanism is only accurate until a certain extent. In complex formulas like the one I was implementing, it showed error but worked. I appreciate all your guys suggestions and hope this would help others who would encounter a similar issue as me.
I think you can try with this
{<college={'*'} - {'0'}> + <university={'*'} - {'0'}>}
not working for me