Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the following records
OrderId, IsCommunityMember,IsSeller
1, 0,1
2,0,1
3,1,1
Now the question is I want to count the orders, the condition is If only the order's Is communityMember =1 or IsSeller=1.
I mean even both 2 columns are =1, that order just can be only counted 1 times.
How to achieve it?
Count({$<IsCommunityMember={1}>+<IsSeller={1}>} Distinct [OrderID])
Hi Donald,
Thanks for your quick reply, as you suggested, it shows the right result.
However, one more related question, there you used distinct to remove the duplicated orders like Order 3, because Both 2 columns are 1.
But If I remove the distinct from you set analysis, it result also is 2 not 3.
I attached the QVW, could you help me again?
If you want only where IsCommunityMember = 1, or IsSeller = 1, but not where both = 1, then use:
Count({$<IsCommunityMember={1}>/<IsSeller={1}>} Distinct [OrderID])
Hi Donald,
What I wanted is, the "1" at least raises in the Column IsCommunity or IsSeller at least 1 times, then take into account.
OrderId, IsCommunityMember,IsSeller
1, 0,1
2,0,1
3,1,1
4,0,0
So for the above samle, we need to remove Order4, because there is no 1 in that 2 columns.
How to achieve that?
I think that's where we started.
See attached. I've included a sample of each of the set operators for you to compare.