Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Help Set Analisys IF

Hello,

I have an expression that works like that:

Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK) + If(TDCORTE2='31-01-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total))) (Works Fine)

Separately works fine. The problem is when I trie to join them (Using 'Or' But doesn't work) The idea is QlikView do the filters as Follows:

Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK) + If(TDCORTE2='31-01-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total))) Or  //Enero2011

Sum({<Fecha_Protesto2={'31-12-2010','31-01-2011','28-02-2011'}>}DeudaK) + If(TDCORTE2='28-02-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total))) Or  //Febrero 2011

Sum({<Fecha_Protesto2={'31-01-2011','28-02-2011','31-03-2011'}>}DeudaK) + If(TDCORTE2='31-03-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Marzo 2011

Thank you!

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Oh, I see... sorry, friday

=If(TDCORTE2='31-01-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total))+Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK),

If(TDCORTE2='28-02-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total))+Sum({<Fecha_Protesto2={'31-12-2010','31-01-2011','28-02-2011'}>}DeudaK),

If(TDCORTE2='31-03-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total))+Sum({<Fecha_Protesto2={'31-01-2011','28-02-2011','31-03-2011'}>}DeudaK))))

View solution in original post

13 Replies
pgalvezt
Specialist
Specialist
Author

Any Help?

Thanks!

Clever_Anjos
Employee
Employee

You shouldn´t use "OR" but the normal IF function syntax

Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK) +

If(TDCORTE2='31-01-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)),

    If(TDCORTE2='28-02-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)),

       If(TDCORTE2='31-03-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))

pgalvezt
Specialist
Specialist
Author

Thank you Clever for your reply. But what happens with:

Sum({<Fecha_Protesto2={'31-12-2010','31-01-2011','28-02-2011'}>}DeudaK) Is a different date.

I have to join Enero, Febreo,Marzo And So On.

Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK) + If(TDCORTE2='31-01-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Enero2011

//Sum({<Fecha_Protesto2={'31-12-2010','31-01-2011','28-02-2011'}>}DeudaK) + If(TDCORTE2='28-02-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Febrero 2011

//Sum({<Fecha_Protesto2={'31-01-2011','28-02-2011','31-03-2011'}>}DeudaK) + If(TDCORTE2='31-03-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Marzo 2011

//Sum({<Fecha_Protesto2={'28-02-2011','31-03-2011','30-04-2011'}>}DeudaK) + If(TDCORTE2='30-04-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Abril 2011

//Sum({<Fecha_Protesto2={'31-03-2011','30-04-2011','31-05-2011'}>}DeudaK) + If(TDCORTE2='31-05-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Mayo 2011

//Sum({<Fecha_Protesto2={'30-04-2011','31-05-2011','30-06-2011'}>}DeudaK) + If(TDCORTE2='30-06-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Junio 2011

//Sum({<Fecha_Protesto2={'31-05-2011','30-06-2011','31-07-2011'}>}DeudaK) + If(TDCORTE2='31-07-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))//Julio 2011

Clever_Anjos
Employee
Employee

Do you want the sum of all "Fecha_Protesto2" or depending of TDCORTE2?

pgalvezt
Specialist
Specialist
Author

I need to show

Enero

Febrero

And So on Depending Of Fecha_Protesto and TDCORTE2

I left a sample picture for better comprehension.

Thank you

whiteline
Master II
Master II

Hi.

I think you should describe what do you want to calculate.

Since in your expressions the result is the same...

Did you mean:

Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK)

+

If(TDCORTE2='31-01-2011' or TDCORTE2='28-02-2011' or TDCORTE2='31-03-2011', Sum(If(Cod_Bloqueo <> 8, Deuda_Total)))

pgalvezt
Specialist
Specialist
Author

Careful Sum({<Fecha_Protesto2={'30-11-2010','31-12-2010','31-01-2011'}>}DeudaK) Its moving one month. Is not always '30-11-2010','31-12-2010','31-01-2011'.

Is:

'30-11-2010','31-12-2010','31-01-2011'.

'31-12-2010','31-01-2011','28-02-2011'

'31-01-2011','28-02-2011','31-03-2011' Its moving one month.

I need to show the other months (Thats all) For now I just show Ene (Jan)

Thanks.


Clever_Anjos
Employee
Employee

Well,

If I understood well you want to sum 3 months relatives to Fecha_Protesto.

Did I get your idea?

pgalvezt
Specialist
Specialist
Author

Yes I did and show the totals for months. Look at the picture I would like to show Ene, Feb and so on With their totals.