Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Cadbury
Contributor
Contributor

Total Exceptions

I have 2 columns, Vendor and Tax Code.  Ideally, a vendor would only use one code.  However, exceptions may occur.  I need to display the total number of exceptions.  So if I have 10 vendors and 3 of them use more than one tax code, I need to display 3 as my answer.  The difficulty is that the data is structured like this:

Vendor                 Code              Amount

ABC                       X1                    100

ABC                      X2                    150

DEF                      X1                     120

DEF                      X2                      130

GHI                      X1                      115

ABC                      X3                     130

In this example, Vendor ABC uses 3 tax codes, and Vendor DEF uses 2 codes.  So the result should be 2 exceptions.  

Any ideas?

1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

Try something like

Count(Distinct {<Vendor = {"=Count(Distinct Code) > 1"}>} Vendor)

Let me know any doubts about the expression.

Regards,

Jaime.

View solution in original post

3 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

Try something like

Count(Distinct {<Vendor = {"=Count(Distinct Code) > 1"}>} Vendor)

Let me know any doubts about the expression.

Regards,

Jaime.

sunny_talwar

Try this

Count(DISTINCT {<Vendor = {"=Count(DISTINCT Code) > 1"}>} Vendor)
Cadbury
Contributor
Contributor
Author

Perfect.  Thank you both so much for your help! 🙂