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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Breckenridge
Regular Visitor

Chart Annual Quota as a daily value

I have a large table of sales data, essentially recording each sale with the date it was made & the salesperson that made the sale.  Each row is a sale, and multiple sales occur daily.

I have a second table with the salesperson's data - name, office location, and importantly an annual sales quota.  The two tables are linked one to many by the salesperson.

 

I have a measure that will calculate my cumulative sales, and i can chart that easily by date, say for a year.  I would like to also chart against the cumulative total a line showing the quota as a straight line rising from zero to the annual amount by the of the year.


Each sales person has a different quota, so having a date table with the individual quotas by date seems impractical.

 

Any help would be appreciated thanks!

1 ACCEPTED SOLUTION

Hey @Breckenridge I did the solution, you basically need to break down your quota per day and then use similar approach to do the running total on quota.

 

To break down quota per day is very easy and here are high level steps:

 

- open query edit

- add two column in your quota date Start Date and End Date, change type to date

- add Custom Column called "Quota/Day" and divide your [Quota] / 365 and change type to decimal number

- change type of your start date and end date column to whole number, add it as new step

- add new custom column called Date and use this {[Start Date]..[End Date]}

- you will notice a date column as list

- click expand arrows on date column and select "expand to new rows"

- change date column data type to date

- remove "quota, end date, start date" columns

 

- in the end you will have 3 columns, Salesperson, Quota/Day and Date

 

close and apply

 

- set relation with this quota[Date] with calendar data table

- add new running total measure for quota similar to what you did in sales 

 

 

drop this new Running total quota measure and you will able to compare it again running total of your sales.

 

I hope it is helpful, if you need further assistance, please post.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

Share a dataset and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

See below for sample, so in January Jim sold $15, Bob sold $35, and Jane sold $25.  

 

I am using this formula to calculate cumulative sales:

 

Split Revenue Cumulative = calculate(sum('SalesTable'[Amount of Sale]),filter(ALLselected('DateKey'[Date]),'DateKey'[Date]<=max('DateKey'[Date])))

 

where 'DateKey' is simply a table of daily dates.

 

I can plot the cumulative sales for the year, in the data below it would rise quickly for Jim at the start of January, and slowly for Jane.  

 

Their quotas I would like to plot alongside, as a straight diagonal line, starting in Jim's case with 1200/365 on Jan 1st, and 2*1200/365 on jan 2nd, etc, so Jim can see how he has been performing against a steadily rising quota.

 

SalesTable

Date                 Salesperson                   Amount of Sale

01-Jan-17Jim5
01-Jan-17Jim10
02-Jan-17Bob15
05-Jan-17Bob20
31-Jan-17Jane25

 

Quota Table

Salesperson          Annual Quota

Jim1200
Bob120
Jane600

@Breckenridge,

Do you want to show daily data of the whole January for each sales person? Could you please post expected result in table format?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have cumulative sales, summed up daily.  This chart here shows me plotting a monthly sum of cumulative sales, and a monthly sales amount.  What i'm missing is the quota - i have a value for the year in a table per sales person, but no way of plotting the quota as it "grows" linearly through the year.  ie I expect a sales person to have sales summing to 50% of their quota 6 months through the year. If they're behind, I'm worried, if they're ahead I'm happy.

 

 

28-11-2017 4-22-07 PM.jpg

Hey @Breckenridge I did the solution, you basically need to break down your quota per day and then use similar approach to do the running total on quota.

 

To break down quota per day is very easy and here are high level steps:

 

- open query edit

- add two column in your quota date Start Date and End Date, change type to date

- add Custom Column called "Quota/Day" and divide your [Quota] / 365 and change type to decimal number

- change type of your start date and end date column to whole number, add it as new step

- add new custom column called Date and use this {[Start Date]..[End Date]}

- you will notice a date column as list

- click expand arrows on date column and select "expand to new rows"

- change date column data type to date

- remove "quota, end date, start date" columns

 

- in the end you will have 3 columns, Salesperson, Quota/Day and Date

 

close and apply

 

- set relation with this quota[Date] with calendar data table

- add new running total measure for quota similar to what you did in sales 

 

 

drop this new Running total quota measure and you will able to compare it again running total of your sales.

 

I hope it is helpful, if you need further assistance, please post.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

That works great, thanks very much!  I was missing th {date..date} and expand - i didn't know i could do that as a query step, thanks!  Its ugly having a giant table of a thousand rows per sales person & a few hundred sales people, but i don't need to look at the table, just need to use it!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.