I have 3 devices configured on my Azure IoT hub. All of them send the same kind of data (temp, humidity, light and their deviceId). I use this IoT hub as input in Azure stream analytics. Then it should be filtered based on the deviceId via a query. I use PowerBI as output. In PowerBI I would like to make a line chart showing the temperature of the three devices. Currently, I use a PowerBI output for each device, which creates three datasets in PowerBI and unfortunately it is not possible to combine datasets.
Any suggestions?
For now I use this query
WITH outputSander as(
SELECT temp,deviceId,System.TIMESTAMP as time
from Sensordata
where deviceId = 'Raspberry_Pi_Sander'),
outputKoen as(
SELECT temp,deviceId,System.TIMESTAMP as time
from Sensordata
where deviceId = 'Raspberry_Pi_Koen')
--outputLukas as(
-- SELECT temp,deviceId,System.TIMESTAMP as time
-- from Sensordata
-- where deviceId = 'Raspberry_Pi_Lukas')
select s1, s2
INTO
[outputData]
FROM
outputSander s1 LEFT JOIN outputKoen s2 on(DATEDIFF(s, s1, s2) BETWEEN 0 AND 5)
As output I would like to see something like this:
S1.temp S1.deviceId, S1.time, S2.temp, S2.deviceId, S2.time with their correct values respectively.
Select <your options> into <output> from <input>
You'll get the output in the same dataset in PowerBI where you could plot a line graph of temp vs time. – Saurabh Kirtani