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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
krscott409
New Member

Punch Data Visualization

Hello, 

I am trying to understand how I might be able to visualize punch data on an area chart but automate the calculation in DAX or M. Ultimately, I want this data on an area chart with time on the time of day on the X-axis and count of working employees on the Y-axis (I will be plotting this data along with 15-minute interval PoS transaction data too).

I have done this in the past in a manual way by listing out all of the times of the day (in 15-minute increments) and placing a "1" for each count of employees working during that 15-minute interval. My question is, is there a way to write DAX or M to get the raw data so that the area chart can consume and plot this data? 

 

Raw Data:

Employee IDPunch StartPunch EndBreak StartBreak End
12349:15 am5:00 pm12:30 pm1 pm
12359 am4 pmnullnull
12368 am3 pm11 am11:30 am

 

Manual Example:

Employee ID88:158:308:459:009:159:309:4510
1234     1111
1235    11111
1236111111111
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @krscott409,

You can create a new time table with fifteen minute as interval, and use its time field with raw table employee field to create a matrix.(time to column, employee to row)

After these steps, you can write a measure formula to lookup raw table records based on the current employee and corresponding time values to return flag and use on matrix value field.

1.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @krscott409,

You can create a new time table with fifteen minute as interval, and use its time field with raw table employee field to create a matrix.(time to column, employee to row)

After these steps, you can write a measure formula to lookup raw table records based on the current employee and corresponding time values to return flag and use on matrix value field.

1.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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