Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created 2 new fields to try to help solve this. One is FlagField4, the other is FlagField5. Now I want to count all those that are in the column [Tier-TierNum] and are a 2. I also need those that are if they are 'bad' in Flagfield4 OR if they are 'bad' in Flagfield5.
I have this so far and it is of course not working:
Count({<[Tier-TierNum]=['2'},flagfield4={'bad'} or flagfield5={'bad'}>}[Tier-TierNum])
How do I get it to see the OR between the 2 separate flagfields equally? I tried adding another flagfield but OR does not appear to be recognized in the data editor menus because the following works in the Sheets if I just add it as a column on a table but will not work as a new field in the data manager.
if(flagfield4='bad' or flagfield5='bad','bad','ok')
I'm so stuck.
As below
=Count({
<[Tier-TierNum]={'2'},flagfield4={'bad'} >+<[Tier-TierNum]={'2'},flagfield5={'bad'}>
}[Tier-TierNum])
Refer below blog
https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/
@SMiller_FL can you share a sample data and the expected output ?
here is some sample data:
Tier-Tiernum | flagfield4 | flagfield5 |
4 | ok | ok |
2 | ok | bad |
4 | bad | bad |
3 | bad | ok |
2 | ok | bad |
1 | ok | ok |
2 | bad | bad |
2 | bad | ok |
count = 4 |
Sorry, let me give you a getter example:
Tier-Tiernum | flagfield4 | flagfield5 | |
4 | ok | ok | |
2 | ok | bad | it counts |
4 | bad | bad | |
3 | bad | ok | |
2 | ok | bad | it counts |
1 | ok | ok | |
2 | bad | bad | it counts |
2 | bad | ok | it counts |
2 | ok | ok | |
2 | ok | ok | |
Total = 4 |
try
Count({<[Tier-TierNum]=['2'},flagfield4={'bad'} >+< [Tier-TierNum]=['2'},flagfield5={'bad'}>}[Tier-TierNum])
the + between the two set analysis modifiers i sthe equivalent of an OR
As below
=Count({
<[Tier-TierNum]={'2'},flagfield4={'bad'} >+<[Tier-TierNum]={'2'},flagfield5={'bad'}>
}[Tier-TierNum])
Refer below blog
https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/
Thanks, knowing he plus sign is the equivalent of OR helps.