Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
My code finally works and thank to all that help me until now
Well, i have this situation
I receive a OID_METER (numeric) and i join this field whith HOUR(of the last 3 consecutive days) and VALUE.
Now i need implant a rule that if i get value zero in any hour of any day i must delete this OID_METER from the row, that means, i just need to show OID_METER's that dont get any zero measure.
How can i delete a row in a field?
ANALISE_FINAL:
LOAD
*
WHERE
(ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0)
AND (ConsumoReal_0>0.005 OR ConsumoReal_1 >0.005 OR ConsumoReal_2>0.005)
AND (HORA0>=2 AND HOUR0<=5);
LOAD
HORA0,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
OID_METER,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_UC,
Sum(CONSUMODIA0)AS ConsumoReal_0, //consume of the day
Sum(CONSUMODIA1)AS ConsumoReal_1, //consume of the day -1
Sum(CONSUMODIA2)AS ConsumoReal_2 //consume of the day -2
RESIDENT ANALISE
GROUP BY
HORA0,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
OID_METER,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_UC
ORDER BY HORA0 DESC;
If this,
The output is -> If consumodia0 =0 or consumodia1 =0 or consumodia2 =0 in any hour delete correspondent OID_METER from the table
is your condition, then,
WHERE consumodia0<>0 or consumodia1<>0 or consumodia2 <> 0 should do it.
Take a Resident of you load statement again and put a Where condition WHERE HOUR<>0.
This will not work, because valeu is in consumodia0, consumodia1 and consumodia2
I'll always have hour measure.
The output is -> If consumodia0 =0 or consumodia1 =0 or consumodia2 =0 in any hour delete correspondent OID_METER from the table
but i dont know how write this
If this,
The output is -> If consumodia0 =0 or consumodia1 =0 or consumodia2 =0 in any hour delete correspondent OID_METER from the table
is your condition, then,
WHERE consumodia0<>0 or consumodia1<>0 or consumodia2 <> 0 should do it.
Understood, so qlik sense doent have a Delete function.
Thanks
Your Welcome Eduardo ,
Like SQL, we don't have a delete statement to delete a record in QlikView or Qlik Sense, rather its all about logical thinking, forming a proper Where condition using appropriate operators and then filtering records.
Regards,
Ganesh
Ganesh thank you for the answer