Forum Discussion
simongallagher
2 years agoNew Member
Real TIme Streaming - Slow
Hello all,
I am using Bi to monitor varios sensors in real time. I am polling devices every second via Modbus, this data gets stored in a SQL DB on Azure, and is brought into BI Service via a tabel that is enabled with incrimental refresh (1 day archive, 1 day incrimental refresh and real time enabled).
Because I need 'instantaneous' values, I am using DAX to return the last date/time in the date/time column if the table and using this date/time to return the last values, for example:
Last Date specific for a meter:
Last EC_A = MAXX (
Filter(all ('Aparrant Power Flows'), 'Aparrant Power Flows'[Serial 2] = "PW505954"),
'Aparrant Power Flows'[Datestamp])
Then to get a variable from that meter at that time stamp:
EC_A Inst Voltage = calculate( sum ('Aparrant Power Flows'[Voltage L1 - L2]), FILTER ('Aparrant Power Flows', 'Aparrant Power Flows'[Datestamp] = 'Z_Last Values'[Last EC_A]), FILTER ( 'Aparrant Power Flows', 'Aparrant Power Flows'[Serial 2] = "PW505954"))
Or for some others (that i dont need to add up in a table):
Comms Network Operator =
Var _maxdate = MAXX (Comms_Derby, Comms_Derby[Time Stamp])
RETURN
MAXX (FILTER(Comms_Derby, Comms_Derby[Time Stamp] = _maxdate), Comms_Derby[Network Operator])
However the visal updates on Service are getting slower, I am assuming this is because the last date queries are woroking through every row to get the 'last date/time', even though there is only two datys of data in the table (but it is a lot of seconds!!).
I need the dashboards to update second by second.
Is there a better way to do this? Can I limit these queries somhow? I can deal with 'historic' data in differnt reports.
Thanks!
1 Reply
- GilbertQSuper User
Why not create a PowerShell script which will push the data into a Power BI real-time dataset?
Your reports can then view this dataset?
Real-time streaming in Power BI - Power BI | Microsoft Learn