Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to combine 2 COUNT statements that have unique Dimension values. I need these to be aggregated, not added. So if either of the two Count statements have some of the same value, that value only gets counted once.
Here are the 2 statements..... Notice that they have some similar Dimension values (Year, Code04), but then some different (Code01,Code02,Code03)
I tried putting an 'OR' between them, but just got -1 as the result.
Any ideas??
Count( {$<Year = {$(=max(MaxYear))}, Code1 = {'Value01','Value02'}, Code04 = {'Value15'}>}distinct ACCOUNT)
Count ({$<Year = {$(=max(MaxYear))}, Code1 = {'Value03'}, Code2 = {'Value05'}, Code3 = {'Value09'}, Code04 = {'Value15'}>}distinct ACCOUNT)
Try:
Count( {$<Year = {$(=max(MaxYear))}, Code1 = {'Value01','Value02'}, Code04 = {'Value15'}> + <Year = {$(=max(MaxYear))}, Code1 = {'Value03'}, Code2 = {'Value05'}, Code3 = {'Value09'}, Code04 = {'Value15'}>}distinct ACCOUNT)
Try:
Count( {$<Year = {$(=max(MaxYear))}, Code1 = {'Value01','Value02'}, Code04 = {'Value15'}> + <Year = {$(=max(MaxYear))}, Code1 = {'Value03'}, Code2 = {'Value05'}, Code3 = {'Value09'}, Code04 = {'Value15'}>}distinct ACCOUNT)
Perfect! Worked like a charm. Thanks so much.