The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear all.
I am very new to Power BI but already deeply in love!
We are monitoring equipment onboard a vessel and data is transmitted by default every 5 minutes marked in yellow. In between data is also transmitted every time a man made event occurs such as cabinet door opening stamped with unique event numbers.
My measure event_seconds get event 27 and 29 right but event 28 returns 4 seconds instead of 1. Problem is that To time = max([ts]) captures the max time within each event but I need to capture the time when door_change flips back to 0.
Below data source:
Data source
Below report
The above is a Matrix in my report sorted on door_event_no. I get event_seconds from this measure:
event_seconds = DATEDIFF(min(whitebox_facts[ts]),max(whitebox_facts[ts]),SECOND)
Any suggestion on how I can write a measure to capture the time stamp when the first logic 0 occurs after logic 1 in door_change?
Sure hope any of this makes sence to you - best regards from west coast of Sweden.
//Björn
My best tip is to represent the data in two fact tables. 1) the automatic 2) man made event (best to do this in Power Query). This will give you a cleaner data model and far easier DAX.
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |