categorization colors not applying correctly

Christian Wunderlich 36 Reputation points Microsoft Employee
2021-08-31T07:02:57.42+00:00

Hi everyone,

quick question about categorization with colors in TSI. I have the following raw data send to event hubs. As you can see, i have extended this raw data with a color column containing some iff statements to create zones (cold, normal, hot) based on the actual temperature! As you see, this works!

127795-rawdata.png

Now, if I take the same query and apply it to TSI, it behaves differently than expected!

127748-zones.png

take a look especially to the markers set. Marker 3 and 4 should be yellow instead of green because temp is below 20. The same applies for Marker 5. This should be green and not yellow. I dont know how i can change this behavior!
127760-tsicolors.png

Does anyone has an answer to this?

Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
{count} votes

Accepted answer
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2021-09-02T14:47:57.943+00:00

    Hello @Christian Wunderlich ,

    I have noticed that your iff statement should include <=20 to show you the expected results.

    iff(tolong($event.temperature.Double) <= 30, iff(tolong($event.temperature.Double) <= 20, 'cold', 'normal'), iff(tolong($event.temperature.Double) > 30, 'hot', 'normal'))  
    

    Neverheless, because you are ingesting hourly temperature values, if TSI ingests temperature 20.5 hourX and then 19.5 hourY you will have the area painted in color "Yellow" between hourX and hourY - and that is expected since TSI assumes you had a flat value of 20.5 during that period.

    Thank you!

    0 comments No comments

0 additional answers

Sort by: Most helpful