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
Anonymous
Not applicable

How To Visualize Event Timelines?

I have a time series dataset as follows:

 

chamod69_0-1617015670266.png

 

The dataset consists of the running states of many machines identified by the Machine column as well as the start and end ties of each state in order. The machines work in 12-hour Day and Night shifts, where the Day shift is from 7 AM to 7 PM, and the Night shift is 7 PM to 7 AM. The Day-Shift column has the form “mm-dd Shift”.

How would I visualize this data using Power Bi in order to obtain a chart like below? I would like to stack each event in order of appearance and separate them by Day-Shift. The Y-axis is the 12-hour period for each shift in seconds (43200 seconds per shift). Additionally my plan is to use a slicer to select the machine so that the chart displays event changes for one machine at a time.

chamod69_1-1617015670328.png

Really appreciate your support !!!!!!!!!!!

 

3 REPLIES 3
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Based on your description, you can create a measure like this:

Diff = 
VAR tab =
    ADDCOLUMNS (
        'Table',
        "Diff",
            IF (
                [End] >= [Start],
                DATEDIFF ( [Start], [End], SECOND ),
                DATEDIFF ( [Start], [End], SECOND ) + 24 * 60 * 60
            )
    )
RETURN
    SUMX ( tab, [Diff] )

Use a slicer and Stacked column chart to show the result:

d1.pngd2.png

Attached a sample file in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

From what I can see, this aggregates the state time differences to find the total time for each state. What I would like to do instead is to stack the events in order of appearance in the table.

I have attached an image demonstrating what I mean for a single shift and a single device.

 

WhatsApp Image 2021-03-31 at 2.16.28 PM.jpeg

Hi @Anonymous ,

In most power bi visuals, the 'Value' field could only use aggregated field to show its value, other data type fields would only show the count value so I'm afraid use a chart visual to show different time states in a day is not supported in power bi currently.

 

Perhaps you can submit the requirement to ideas and add your comments there to make this feature coming sooner: https://ideas.powerbi.com/forums/265200-power-bi-ideas


It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the 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.