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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

And Like Add

Hi, I have this formula:

=((Sum(If(Cod_Bloqueo <> 8 And Tramos = 'Tramo 1', Deuda_Total*Porc_Provision))/Divisor) - (Sum(Saldo_Cob)/Divisor) - (Sum(Saldo_Dic)/Divisor) -(Sum(Saldo_Susp)/Divisor))

/

((Sum(If(Cod_Bloqueo <> 8, Deuda_Total))/Divisor) - (Sum(Saldo_Cob)/Divisor) - (Sum(Saldo_Dic)/Divisor) -(Sum(Saldo_Susp)/Divisor))

Works fine...

But

I need to add a new Tramos

=((Sum(If(Cod_Bloqueo <> 8 And Tramos = 'Tramo 1' And Tramos = 'Tramo 2', Deuda_Total*Porc_Provision))/Divisor) - (Sum(Saldo_Cob)/Divisor) - (Sum(Saldo_Dic)/Divisor) -(Sum(Saldo_Susp)/Divisor))

/

((Sum(If(Cod_Bloqueo <> 8, Deuda_Total))/Divisor) - (Sum(Saldo_Cob)/Divisor) - (Sum(Saldo_Dic)/Divisor) -(Sum(Saldo_Susp)/Divisor))

But when I did the filter gave me a different result. Maybe the AND is bad?

Thank You!

6 Replies
MayilVahanan

Hi

Do you want Tramos filed contain both 'Tramo 1' and 'Tramo 2', then your expression correct.. I think for that particular filter selection may be its not satisfy both the Tramos condition..Please check the data..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
pgalvezt
Specialist
Specialist
Author

Thank you for yor reply

I have 6 tramos. I can get the good result with just 1 Tramo but when I trie to add another Tramo Gave me another Result when I do the filter.

MayilVahanan

Hi

For a same filter , did u tested the result for tramo1 alone and both tramo1 and tramo2 ?? If so, please you use the table box and give the test filters and tramo and noted that contain both values.. if not, then its show the different results..

Or

Use OR instead of AND..May be its give... Can you explain your requirement once..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
pgalvezt
Specialist
Specialist
Author

I tried another formula with set Analysis:

=(Sum({<Credito_Consumo,Tramos_Consumo>} (Saldo_Insoluto_Consumo)*Porc_Provision_Consumo)/Divisor)/(Sum(Saldo_Insoluto_Consumo)/Divisor)

When I do the filter with any Tramos gave me a good result:

But

=(Sum({<Credito_Consumo,Tramos_Consumo={'Tramo 0'}>} (Saldo_Insoluto_Consumo)*Porc_Provision_Consumo)/Divisor)/(Sum(Saldo_Insoluto_Consumo)/Divisor)

Gave: "No data to show"

What can be?

Thanks

MayilVahanan

HI

Can you able to post a sample file?

or

Try with this

=(Sum({<Credito_Consumo = ,Tramos_Consumo={'Tramo 1'}>} (Saldo_Insoluto_Consumo)*Porc_Provision_Consumo)/Divisor)/(Sum(Saldo_Insoluto_Consumo)/Divisor)

if you get the result for above expression then please check the data for Tramos_Consumo

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
pgalvezt
Specialist
Specialist
Author

=(Sum({<Credito_Consumo = ,Tramos_Consumo={'Tramo 1'}>} (Saldo_Insoluto_Consumo)*Porc_Provision_Consumo)/Divisor)/(Sum(Saldo_Insoluto_Consumo)/Divisor)

Gave me 0,1 % the real result is 56% When I did the filter. The weight of my QV Model is of 300 MB is impossible send to you a sample