Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
I met a problem that I don't how to display the operation status of equipment with a line chart.😭
The concept template and raw data are like this:
We have the Down and Start time data of the equipment, just want to monitor it's actual operation status showed as 0 &1.
Anyone have some solutions or ideas?
Down time | Up time |
7/16/2023 9:00:00 PM | 7/21/2023 11:30:00 PM |
7/28/2023 11:05:00 PM | 7/31/2023 11:59:00 PM |
8/1/2023 12:00:00 AM | 8/1/2023 3:00:00 AM |
8/2/2023 3:00:00 AM | 8/11/2023 4:00:00 AM |
8/12/2023 5:00:00 AM | 8/15/2023 11:00:00 PM |
8/18/2023 3:30:00 AM | 8/25/2023 12:00:00 AM |
Solved! Go to Solution.
Hi @2023Lee ,
Try the following:
In Query editor, create this query:
let
Source = Source,
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
#"Added Custom" = Table.AddColumn(#"Unpivoted Columns", "Running Flag", each if [Attribute] = "Down time" then 0 else 1),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Running Flag", Int64.Type}})
in
#"Changed Type"
where Source is the table with up and downtimes, with the two columns in proper date/time format.
Then you can create the following line chart:
You achieve this look by changing Line Type to Step in the Visual settings for the line chart.
One small issue is that the step will change always at the halfway point between the two specified times, so it will show the chart incorrectly. I found others have similar issue in this thread where the proposed solution is to use Power KPI 2.0.0 custom visual instead.
I hope this helps.
Proud to be a Super User! | |
Hi @2023Lee ,
Try the following:
In Query editor, create this query:
let
Source = Source,
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
#"Added Custom" = Table.AddColumn(#"Unpivoted Columns", "Running Flag", each if [Attribute] = "Down time" then 0 else 1),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Running Flag", Int64.Type}})
in
#"Changed Type"
where Source is the table with up and downtimes, with the two columns in proper date/time format.
Then you can create the following line chart:
You achieve this look by changing Line Type to Step in the Visual settings for the line chart.
One small issue is that the step will change always at the halfway point between the two specified times, so it will show the chart incorrectly. I found others have similar issue in this thread where the proposed solution is to use Power KPI 2.0.0 custom visual instead.
I hope this helps.
Proud to be a Super User! | |
Hi @dk_dk
Thanks for your solution, I used the query and Power KPI 2.0.0 for the visiualization, it seems can solve this problems. I can choose the Step-after of this line chart interpolation, which will not change in the halfway point.
Many thanks for your kindness!😀