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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
melimob
Frequent Visitor

Employee Annual and Monthly Targets - KPI

Hi All

New PBI user..

I have a simple data table showing targets by employee for 2019 and 2020:

 

Employee, Annual Target, Monthly Target (which is just annual /12), Year

 

I have their actual sales by employee, month and year in another table and want to use a KPI to show if they're on target or not.

Issue is, it's not allowing me to relate employee name with my key as there are multiples in my target data?

Also, as my above target table doesn't list month, i.e. Jan, Feb etc.. I can't link to my 'Month' calendar to see how they are performing against monthly goal?

 

Any ideas on how I should set my target table up please?

 

Many thanks

 

6 REPLIES 6
amitchandak
Super User
Super User

To solve the problem of the month and year Target, you can save target on the month-end date and for each month divide target by 12.

 

Are targets given employee wise or target is same for all employees ?

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Hi Amit

 

Thanks for your reply.

Each employee has a seperate annual target which is different by year.

 

Do I need to create a table for each year?

I basically need to show:

What % each employee has achieved against target across:

Month, Quarter, YTD.

 

Any videos you can recommend to how I would do this, greatly appreciated.

Many thanks 

 

Please find the pbix :https://www.dropbox.com/s/tz74khz4m5iyq0q/anuualMonthlyTarget.pbix?dl=0

 

I converted the yearly target into the monthly target with help of date table. Now you can add Qtr into date table and view it by month, Qtr or year.

Or you can use these types of time intelligence functions.

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))

MTD (Year End) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFYEAR('Date'[Date])))
MTD (Last Year End) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFYEAR(dateadd('Date'[Date],-12,MONTH),"8/31")))
Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-3,MONTH)) 

Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-12,MONTH))  
3 month back MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-3,MONTH)))
 


QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))

Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))
Next QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],1,QUARTER)))

Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))



YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi

https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

 

thank you so so much for going to all this effort on here.

 

I will give this a go and read up on the links you sent and try and apply it.

 

Thank you again!

Hi Amit

 

Thanks for your help thus far.  I already have a calendar table however I added the 4 new tables you sent over.

I have linked the new 'Date' table to my main calendar table in order to have it filtered according to my chosen month year slicer (which is referencing from the main calendar table).

 

However, I can't seem to link the Annual and Monthly targets to this date so that when I filter or what to show Monthly actual sales vs. target, it gives right results?

 

Sorry to ask for assistance again.  All help appreciated.

 

KR

Mel

 

I would like to know that, too. How did you solve it?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.