cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Saaharjit Regular Visitor
Regular Visitor

HOW TO CALCULATE THROUGH PUT

I have have a table containing units produced by an employee on a particular date.

1. i want to be able to provide a date fliter to the user. For eg if the user wants to see the production from 18 apr 2017 to 28 apr 2017.

2. Calculate throughput. i.e. Sum of units produced by and employee between the days mentioned above / number of days in the date filter.

 

EDIT : i was able to accomplish the first part. Now I just want to divide the unit by the number of days in the date filter. In this case it would be 10 days.

1 ACCEPTED SOLUTION

Accepted Solutions
dkay84_PowerBI New Contributor
New Contributor

Re: HOW TO CALCULATE THROUGH PUT

First, you should create a date table that links to your fact table.

 

Then, create a few measures:

 

Production = Sum(Table[Units])

DayCount = Datediff(Min(Calendar[Date]), Max(Calendar[Date], day))

 

Finally:

 

Throughput = Production/DayCount

 

Now, when you put in date range slicer using the date table field, a selected date range will filter the production table, so you only get the units produced for that range.  The DayCount measure counts the days in the calendar table based on the min/max (which will be adjusted based on your filter selection).

 

If you want to view by employee, create a table or other visual with employee name as an axis/row, and add the measure to the values field for the visual (or add a slicer for employee from the production table).

 

View solution in original post

4 REPLIES 4
dkay84_PowerBI New Contributor
New Contributor

Re: HOW TO CALCULATE THROUGH PUT

First, you should create a date table that links to your fact table.

 

Then, create a few measures:

 

Production = Sum(Table[Units])

DayCount = Datediff(Min(Calendar[Date]), Max(Calendar[Date], day))

 

Finally:

 

Throughput = Production/DayCount

 

Now, when you put in date range slicer using the date table field, a selected date range will filter the production table, so you only get the units produced for that range.  The DayCount measure counts the days in the calendar table based on the min/max (which will be adjusted based on your filter selection).

 

If you want to view by employee, create a table or other visual with employee name as an axis/row, and add the measure to the values field for the visual (or add a slicer for employee from the production table).

 

View solution in original post

Saaharjit Regular Visitor
Regular Visitor

Re: HOW TO CALCULATE THROUGH PUT

Thank you for your help. I have a question though. What if i have the date in the same table. Can i not use the datesbetween function? I just don't know its proper syntax.

 

 

dkay84_PowerBI New Contributor
New Contributor

Re: HOW TO CALCULATE THROUGH PUT

It is always a best practice, and actually required by some time intelligence DAX functions, to have a date table.  This means that you have a table with every date in your required range, no duplicates, and any other date related info related to your use case (i.e. month name, quarter of year, fiscal year, etc.)

Saaharjit Regular Visitor
Regular Visitor

Re: HOW TO CALCULATE THROUGH PUT

is it possible to exclude weekend days in the day count?

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 316 members 3,251 guests
Please welcome our newest community members: