Superset beginner here...
So I have a decent size of data (flow measurements) that needs to be interpreted differently depending on the measuring device collecting the data.
For most part of the data, it is straightforward. AVG m3/h, to get a daily value I just sum avg*24 to get a sum.
But a few measuring devices works differently. They are pulsed base which means that the aggregate up during the day and then reset for the next day. To get a sum for a daily value I then need to use a MAX grouped by day (values are per minute).
A simple solution would be to manage this when displaying the data in superset, that would allow me to retain my high granularity data (per minute) where it's needed but also provide sum per day and month.
I'm wondering if this could be achieved with a metric SQL specific (in a table for instance)? Say, when unit = m3/day THEN value*24 else unit=m3/day then MAX(value). This also needs to be grouped by day.
I don't really get the syntax needed for this. Maybe it's because I confuse it with how I code in the load screen. I also don't really get how a grouping here would relate to the granularity chosen for the created table.
Any advice?
I have tried a different approach doing this back-end but it is a clumsy solution...