Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have a time series dataset as follows:
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.
Really appreciate your 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:
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.
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.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
102 | |
71 | |
64 | |
39 |