Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
eduardo_dimperio
Specialist II
Specialist II

How Delete a Data?

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;

1 Solution

Accepted Solutions
ganeshsvm
Creator II
Creator II

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.

View solution in original post

6 Replies
ganeshsvm
Creator II
Creator II

Take a Resident of you load statement again and put a Where condition WHERE HOUR<>0.

eduardo_dimperio
Specialist II
Specialist II
Author

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

ganeshsvm
Creator II
Creator II

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.

eduardo_dimperio
Specialist II
Specialist II
Author

Understood, so qlik sense doent have a Delete function.

Thanks

ganeshsvm
Creator II
Creator II

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

eduardo_dimperio
Specialist II
Specialist II
Author

Ganesh thank you for the answer