Count Distinct 2 columns

I want to cout the distinct number of invoices from a table. Unfortunately, there are instances where the invoice id is repeated from venue to venue. Is there a way in Crystal to count distinct from 2 columns? In SQL I would write:
count(distinct v.VendorCode || ‘_’ || i.InvoiceID) so how can I modify this existing report to sum a column like this?

Thanks for your help,

Mike.


MikeHenshaw (BOB member since 2009-06-08)

create a formule (v.VendorCode || ‘_’ || i.InvoiceID) as x and use count(distinct x). It might work.


jayad (BOB member since 2008-07-11)

It worked! It took me a while to figure out the formula editing in Crystal but the report’s now reflecting the numbers expected.

Thanks :smiley:


MikeHenshaw (BOB member since 2009-06-08)