Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I'm new to QV,
In a set analysis, I would like to sum according to conditions that are stocked in two different columns. Let's say column A and B have to be positive
I have the feeling that this is a very simple problem but looking for "set analysis or" in the forum doesn't help a lot as 'or' is not a very distinctive word...
Someone can give me a hint ?
The"+"-sign is used for OR in set analysis
Try this,
if(sum(DISTINCT {<column_A={'>0'}>}quantity) or sum(DISTINCT {<column_B={'>0'}>}quantity),SUM(distinct (quantity)))
it works in my case..
Had the same question, already posted that but then I saw this reply to a similar question in the forum:
http://community.qlik.com/message/51239#51239
Which implies that your solution would be:
sum(DISTINCT {<column_A={'>0'}> + <column_B={'>0'}>} quantity)
(deleted my question and added this reply instead)
I agree with what’s being said. In Set analysis the logical operator “or” is written with a “+”. It works fine for me
The syntax is important, the + should be placed between the conditions of the set analysis : { www.coetsens.com
Envoyé : mercredi 1 juin 2011 09:33
À : luc_fr_75
Objet : - Re: "OR" operator in set analysis
<http://community.qlik.com/index.jspa> QlikCommunity
Re: "OR" operator in set analysis
created by nessinot <http://community.qlik.com/people/nessinot> in New to QlikView - View the full discussion <http://community.qlik.com/message/120945#120945
Try this:
=Count({$<column_A={'>0'}> + <column_B={'>0'}>}DISTINCT quantity)