Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi people,
I need some help please.
I did this code below, with the result like the image, but i need to show Consumo0 (today), Consumo1(today -1) and Consumo2(today -2), side by side.
The problem is each read are was diferent day. How can i do this?
ANALISE_TMP:
LOAD
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
OID_METER,
NAME_TYPE_METER,
TYPE_CONSTANT,
NAME_UC,
ADDRESS_BLOCK_UC,
DATE_READ,
VALUE_READ,
If(OID_METER= Peek(OID_METER) and Floor(DATE_READ)= Floor(Today()),(Peek(VALUE_READ)- VALUE_READ) * TYPE_CONSTANT) as CONSUMODIA0,
If(OID_METER= Peek(OID_METER) and Floor(DATE_READ)= Floor(Today()-1),(Peek(VALUE_READ)- VALUE_READ) * TYPE_CONSTANT) as CONSUMODIA1,
If(OID_METER= Peek(OID_METER) and Floor(DATE_READ)= Floor(Today()-2),(Peek(VALUE_READ)- VALUE_READ) * TYPE_CONSTANT) as CONSUMODIA2
RESIDENT TMP2 WHERE OID_METER=70794 AND NAME_UC ='ZELADORIA'
ORDER BY OID_METER DESC;
Hi,
About my output, how can i put in order in a line by hour my select?
I made a example between what i have and what i want.
Thank you for the pacience
ANALISE:
LOAD
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
OID_METER,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_UC,
HORA,
CONSUMODIA0,
CONSUMODIA1,
CONSUMODIA2
RESIDENT ANALISE_TMP;
Make a table in QS with dimension = the date/time field and measure = max(consumodia0).
But i dont want only the max value of consumodia0, i need all values organized by hour
That way, the result is quite diferent of what i need
Maybe you could post some data or a *.qvf.
Unfortunately not, because it's confidential information.
But's ok ill figure out something.
I think the problem is about my field HORA, thats dont have distinct values
Hi everyone,
I finally resolve the problem:
ANALISE:
LOAD
OID_METER,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
NAME_TYPE_METER,
TYPE_CONSTANT,
NAME_UC,
ADDRESS_BLOCK_UC,
DATE_READ,
VALUE_READ,
CONSUMODIA0,
CONSUMODIA1,
CONSUMODIA2,
If (OID_METER =PEEK(OID_METER), PEEK(CONSUMODIA0)- CONSUMODIA0) AS CONSUMO_REAL0,
If (OID_METER =PEEK(OID_METER), PEEK(CONSUMODIA1)- CONSUMODIA1) AS CONSUMO_REAL1,
If (OID_METER =PEEK(OID_METER), PEEK(CONSUMODIA2)- CONSUMODIA2) AS CONSUMO_REAL2,
HORA
RESIDENT ANALISE_TMP
after i use SUM() in the grafic part.
Thank all for the help