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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
LSPbi96
New Member

Calculate the efficiency with accumulated data

Hello Experts, I am new to PowerBi, currently making one report to calculate the efficiency (day used) for hiring. 

I have tried different Measures but still cannot get the accummulated and average. 

 

This is my raw data :

Request Approve DateHiring DateEfficiency (Hiring date minus Request aprove date)

No of People

6-Jan-227-Apr-22911
4-Jan-2225-Apr-221111
24-Jan-2210-May-221061
18-Feb-2210-Jun-221121
19-Apr-2216-Jun-22581
21-Feb-2220-Jun-221191
10-May-2223-Jun-22441
15-Apr-224-Jul-2279.249311
31-Mar-228-Jul-2298.263891
07-Apr-2219-Jul-22102.66111
22-12-2121-Jul-222111
02-Mar-2221-Jul-22140.43131
31-Mar-2215-Aug-22136.26391
21-Feb-2215-Aug-22174.35281
28-12-2116-Aug-222311
24-Jan-2222-Sep-222411
25-Aug-2228-09-22341
05-Mar03-10-225771
02-Aug-2211-10-22701
30-Jun-2228-10-22119.46671
05-Jan-2201-11-223001

 

I will need the data to calculate by monthly basis, the fomula in excel is :

Efficiency = Hiring date - Request aprove date

Monthly time of hiring = (first month) Total up the efficiency of that month / total people hired that month. 

(upcoming months) Total up the efficiency of current month and previous months / total people hired current month and previous months. 

 

Example:

April = (91+111)/(1+1)=101 days

May = (91+111+106)/(1+1+1)=103 days

 

My image of the result is as below: 

MonthEfficiency
Apr101
May103
Jun92
Jul97
Aug113
Sep117
Oct141
Nov150

 

Thank you for attending my post. 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@LSPbi96 

you can create a date table and create a measure

Measure = 
VAR _eff=sumx(FILTER(all('Table'),'Table'[Hiring Date]<=max('Table'[Hiring Date])),'Table'[Efficiency])
var  _num=CALCULATE(COUNTROWS('Table'),FILTER(all('Table'),'Table'[Hiring Date]<=max('Table'[Hiring Date])))

return _eff/ _num

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@LSPbi96 

you can create a date table and create a measure

Measure = 
VAR _eff=sumx(FILTER(all('Table'),'Table'[Hiring Date]<=max('Table'[Hiring Date])),'Table'[Efficiency])
var  _num=CALCULATE(COUNTROWS('Table'),FILTER(all('Table'),'Table'[Hiring Date]<=max('Table'[Hiring Date])))

return _eff/ _num

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks alot! It really works!😁

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Monthly Update - June 2024

Power BI Carousel June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.