HOW TO CLEAN NULL FROM MY GET QUERY

5 views (last 30 days)
GONZALO GARCÍA
GONZALO GARCÍA on 30 Aug 2022
Hi,
I´m having trouble using power BI to get data from Thingspeak.
I´m usin this to get the data:
= Json.Document(Web.Contents("https://api.thingspeak.com/channels/xxxxxxx/fields/1.json?api_key=xxxxxxxxxxxx&results=8000"))
and what I´m getting looks like this:
crated at entry id field1
2022-0823T11:58:51Z 2510952 null
2022-0823T11:59:51Z 2510953 null
2022-0823T12:01:51Z 2510954 34.500
2022-0823T11:02:51Z 2510955 null
2022-0823T11:03:51Z 2510956 null
The real data from field 1 in Thingspeak is the one with the 34.500 value, the rest of the data is the time when data from other fiels was taken, but as yo can see with null as value. I only need the fields with real data and I don´t want to do it by filtering after because I will be getting one real result from 5 result got from thingspeak (8000:5=1600 real values for me)
Thank you for your help

Answers (1)

Christopher Stapels
Christopher Stapels on 1 Sep 2022
Edited: Christopher Stapels on 1 Sep 2022
We reccomend using multiple channels to record your data in the case of multiple devices or sensors with different frequencies. Another thing you can do is create a MATLAB analysis app that splits the data into multiple channels and then use a time control to automate that process.

Categories

Find more on Read Data from Channel in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!