Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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
  • Anonymous's avatar
    Anonymous
    3 years ago

    HI Anonymous,

    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.

    Regards,

    Xiaoxin Sheng

1 Reply

Replies have been turned off for this discussion
  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous,

    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.

    Regards,

    Xiaoxin Sheng