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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.