- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cumulative sales per day and other fields
I've got a table that has start and stop times by employee, hourly rate, and location.
I'd like to calculate my employee cost (in 15 minute increments) throughout the day. As a caveat, there are different start and stop times throughout the day, i.e. people clock in differently
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ARibaudo
I first concatenated your date and time
then converted it to date time from modeling
and figured out difference in time, in minutes, with datediff
divide the value with 15 and round up now multiply this with unit pay amount
all of this done in columns so you can sum up easily.
Start Dt_Time = Table1[Date] & " " & Table1[Start] // for concatination
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ARibaudo,
Please share sample data of your table and post expected result here.
Regards,
Lydia
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My apologies, the title should be Measuring Intervals - not sure how that happened.
These are the steps I followed but can't figure out how to do it by date:
Step 1) built an [Times] Table that has all the intervals in 15 minute increments,
Interval |
0:00:00 |
0:15:00 |
0:30:00 |
0:45:00 |
1:00:00 |
Existing [Data] Table that has username, date (not unique value), start time, stop time:
username | Date | Start Time | End Time |
a | 5/4/2018 | 12:00:00 AM | 12:00:00 AM |
a | 5/3/2018 | 12:00:00 AM | 12:00:00 AM |
a | 5/2/2018 | 12:00:00 AM | 12:00:00 AM |
a | 5/1/2018 | 12:00:00 AM | 12:00:00 AM |
a | 4/30/2018 | 12:00:00 AM | 12:00:00 AM |
a | 4/27/2018 | 12:00:00 AM | 12:00:00 AM |
a | 4/26/2018 | 12:00:00 AM | 12:00:00 AM |
a | 4/25/2018 | 12:00:00 AM | 12:00:00 AM |
a | 4/24/2018 | 12:00:00 AM | 12:00:00 AM |
a | 4/23/2018 | 12:00:00 AM | 12:00:00 AM |
b | 5/4/2018 | 6:50:00 AM | 3:30:00 PM |
b | 5/3/2018 | 8:30:00 AM | 1:11:00 PM |
b | 5/2/2018 | 6:30:00 AM | 11:45:00 AM |
b | 5/1/2018 | 12:30:00 PM | 3:46:00 PM |
b | 4/30/2018 | 6:30:00 AM | 4:30:00 PM |
b | 4/27/2018 | 6:30:00 AM | 3:30:00 PM |
b | 4/26/2018 | 6:30:00 AM | 12:30:00 PM |
b | 4/25/2018 | 6:30:00 AM | 11:29:00 AM |
b | 4/24/2018 | 6:30:00 AM | 10:07:00 AM |
b | 4/23/2018 | 6:30:00 AM | 3:26:00 PM |
c | 5/4/2018 | 6:00:00 AM | 5:15:00 PM |
c | 5/3/2018 | 7:00:00 AM | 4:00:00 PM |
c | 5/2/2018 | 6:00:00 AM | 3:00:00 PM |
c | 5/1/2018 | 8:45:00 AM | 4:15:00 PM |
c | 4/30/2018 | 6:00:00 AM | 6:00:00 PM |
c | 4/27/2018 | 6:00:00 AM | 5:15:00 PM |
c | 4/26/2018 | 6:30:00 AM | 6:30:00 PM |
c | 4/25/2018 | 6:00:00 AM | 2:30:00 PM |
c | 4/24/2018 | 6:30:00 AM | 4:30:00 PM |
c | 4/23/2018 | 6:00:00 AM | 4:30:00 PM |
Step 2)
Expanded Table = SELECTCOLUMNS(
FILTER(
CROSSJOIN(Data,Times),
[Start Time]<='Times'[Interval]
&& 'Data'[End Time] >'Times'[Interval]
),
"Employee",[username],
"Time Inteval",[Interval],
"Total Pay",[Pay]
)
The problem is I can't seem to get it to slice by date. Thanks, Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ARibaudo,
Where is Pay field in your table? Calculated table will not response to slicers. See https://community.powerbi.com/t5/Community-Knowledge-Base/Calculated-Column-Table-Change-Dynamically... .
Regards,
Lydia
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't include it. It is a separate table [Employee List] that shows hourly pay rates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Making a relationship between two tables on employee code/ name should work.
If not pls share your tables structure with sample data and expected output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I am new to Power BI as well and have a very similar questions. I am trying to link my hourly sales to the hourly labor expense. The labor information that I have comes as follows:
Date Name Clock In Time Clock out Time
Do you how I can be able to do this ?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
12-09-2024 06:53 AM | |||
06-10-2024 07:26 AM | |||
05-09-2024 06:58 AM | |||
11-03-2024 12:18 PM | |||
08-02-2017 02:12 PM |