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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I have a number of machines and data showing a list of events (switch on and off), a small sample of which is shown here:
| Machine | Date/Time | Event |
| 01 | 23/02/2023 10:48:00 | Activated |
| 01 | 23/02/2023 11:23:00 | Deactivated |
| 02 | 23/02/2023 11:52:00 | Activated |
| 03 | 23/02/2023 11:56:00 | Activated |
| 01 | 23/02/2023 12:04:00 | Activated |
| 04 | 23/02/2023 12:34:00 | Activated |
| 04 | 23/02/2023 12:38:00 | Deactivated |
| 05 | 23/02/2023 12:41:00 | Activated |
| 03 | 23/03/2023 12:43:00 | Deactivated |
Is there any way to show graphically the number (or percentage) of machines "active" over time?
Many thanks
Counting ACTIVE Measure = CALCULATE ( COUNTROWS ( 'Machine Events' ), 'Machine Events'[Event] = "Activated" )
Proud to be a Super User! | |
No, not easily, plus a machine may have a number of activate and deactivate events over the time period.
I had considered if it would be possible to have a running count of the number of activate events minus the number of deactivate events, but I'm not sure how to do that.
You may need to get the data into a different shape. Any chance you can pair the Activate and Deactivate records for one machine on one row? Then you can calculate on that row how long the machine was active. Seems that would make it easier to get your final answer.
Proud to be a Super User! | |
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 130 | |
| 111 | |
| 48 | |
| 30 | |
| 28 |