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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DeanUW
Helper I
Helper I

DAX Expression to Count how many sales people have met or exceeded their sales quota for 2023

Hello,

 

I have a fact table that contains all of the sales transactions for all of the sales people (star schema with sales in one table, sales agents in another, and office data in a third merged into one central fact table).  I need to count how many sales people have a YTD sales total that exceeds there 2023 sales threshold.  The columns in the fact table include:

 

[Person ID] = unique key,  will appear multiple times in the table for each sale.

[Gross Amount] = calculated column that is simply [credits] - [debits] for every sales line. it is not calculating YTD total only the gross for each sale.

[2023 Threshold] = different values are given to different sales people.

[postingDate] = the date the sales transaction occured.

 

The co-pilot feature has not been much help creating a DAX expression that will count the distinct [Person ID] whose YTD total >= [2023 Threshold]; & my DAX skills are not quiet advanced enough.  Every attempt I have made only ends up counting the people who had a single transaction above their quota not their YTD total sales amount.

 

Thank you in advance to anyone who is able to assist!

1 ACCEPTED SOLUTION
Take3
Regular Visitor

@DeanUW 

 

Please try the following.

 

Take3_0-1690564711932.png

 

Take3_1-1690564797849.png

 

NOTE: I created the below test Fact table.  As you can see from the data, Ed & Joe met their threshold, while Sarah did not.  For this reason, 2 is the correct number of persons who exceeded their threshold for 2023.

 

Take3_2-1690564891087.png

 

Take3_3-1690564925001.png

 

Regards,

Nathan

 

P.S.  I used DAX to create my own Calendar table for Time Intelligence functions to work.

 

Take3_4-1690564982341.png

 

Take3_5-1690565006636.png

 

 

 

 

 

 

View solution in original post

1 REPLY 1
Take3
Regular Visitor

@DeanUW 

 

Please try the following.

 

Take3_0-1690564711932.png

 

Take3_1-1690564797849.png

 

NOTE: I created the below test Fact table.  As you can see from the data, Ed & Joe met their threshold, while Sarah did not.  For this reason, 2 is the correct number of persons who exceeded their threshold for 2023.

 

Take3_2-1690564891087.png

 

Take3_3-1690564925001.png

 

Regards,

Nathan

 

P.S.  I used DAX to create my own Calendar table for Time Intelligence functions to work.

 

Take3_4-1690564982341.png

 

Take3_5-1690565006636.png

 

 

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.