Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI
Im fairly new to qlikview and im trying to do the following , in the below table there is 3 zeros in the picked column and 3 zeros in the BOH column, so there is 3 instances were picked = 0 and BOH = 0.
how do i create an expression where i can get the value 3 returned ( this is the 3 instances were 0 = 0.)
picked | BOH |
---|---|
1 | 1 |
0 | 0 |
0 | 0 |
0 | 0 |
5 | 4 |
i believe in excel the countifs function can be used.
thanking you in advance
Lynn
Are you expecting this?
Count({<picked = {'0'}, BOH={'0'}>} Measure)
OR
Count(If(picked=0 and BOH = 0,Measure))
im trying to determine where ever picked = 0 and BOH = 0, how many instances of that is there.
Hi Lynn,
This should do the trick. You just need to compare the two fields against each other to find matches...
=num(count(if(picked=BOH,[YourMainIdentifierField])),'#,##0')
If you're only matching the 0's, then this will suffice...
=num(count({$<picked={0},BOH={0}>}[YourMainIdentifierField])),'#,##0')
Sam
Hi Lynn,
Just create a column like below. Let me know if it helps.
LOAD
Picked,
BOH,
if(Picked = BOH, 'TRUE', 'FALSE') as Match
INLINE [
Picked, BOH
1, 1
0, 0
0, 0
0, 0
5, 4
];
May be?
Count({<picked = {'0'}, BOH={'0'}>} Instance) // Here, I haven't seen any Instance field in your data
=num(count({$<picked={0},BOH={0}>}picked)),'#,##0')
Please provide enough data to build the logic, here you need to find out instances , so what should be counted as instances, is there any Key field in your data?
You could just count one of the fields mentioned as outlined in my example above.