# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Valued Contributor 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:

*

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);

HORA0,

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

OID_METER,

NAME_TYPE_METER,

NAME_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,

ORDER BY HORA0 DESC;

1 Solution

Accepted Solutions
Contributor

## Re: How Delete a Data?

If this,

 The output is -> If  consumodia0 =0 or consumodia1 =0 or consumodia2 =0 in any hour delete correspondent OID_METER from the table

WHERE consumodia0<>0 or consumodia1<>0 or consumodia2 <> 0  should do it.

6 Replies
Contributor

## Re: How Delete a Data?

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

Valued Contributor II

## Re: How Delete a Data?

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

Contributor

## Re: How Delete a Data?

If this,

 The output is -> If  consumodia0 =0 or consumodia1 =0 or consumodia2 =0 in any hour delete correspondent OID_METER from the table

WHERE consumodia0<>0 or consumodia1<>0 or consumodia2 <> 0  should do it.

Valued Contributor II

## Re: How Delete a Data?

Understood, so qlik sense doent have a Delete function.

Thanks

Contributor

## Re: How Delete a Data?

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

Valued Contributor II

## Re: How Delete a Data?

Ganesh thank you for the answer

Community Browser