Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Want to identify the Unique Invoice numbers assigned to a sales rep and the count how many Unique Invoice numbers.


This topic is 4270 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi All,

I have not been on the forum for several years - hopefully I'm doing this correctly.

 

I want to identify the Unique Invoice numbers assigned to a sales rep and then count how many Unique Invoice numbers there are. I need the count so a can generate the average value of each sale. Example (first 30 records):

 

Rec - Sales Person Rec Num (Invoice) Summary  Adam Cravens 2040122 Adam Cravens Adam Cravens 2040122 2040122 Adam Cravens 2040122 2040129 Adam Cravens 2040122 Total of two unique invoices Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040122   Adam Cravens 2040129   Brian Aufdenberg 2040116 Brian Aufdenberg Brian Aufdenberg 2040116 2040116 Brian Aufdenberg 2040116 Total of one unique invoice  Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116   Brian Aufdenberg 2040116  

 

Thanks and Take Care

Buck McCue

 

 

 

Posted

8.5 Advanced? Hm...from the Sales Rep table, you have a relationship based on Sales Rep ID? You could use List ( SalesRec::Invoice ) to grab all the Invoices for that Sales Rep. Then use a custom function to grab the unique values.

 

Something like this:

UniqueValues( values )

 

Let([
this.value = GetValue ( values ; 1) ;
value.count = ValueCount ( values ) ;
new.list = RightValues ( values ; value.count - 1) ;

this.value = If ( IsEmpty ( FilterValues ( new.list ; this.value ) ) ; this.value ) ;
pilcrow =   If ( not IsEmpty ( this.value ) ; ¶ ) ;
result = this.value & Case ( value.count > 1   ; pilcrow & UniqueValues ( new.list ) )
] ;
result
)

This topic is 4270 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.