Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Data = 0

Hello,

I have a table with many departments and values by Accounts and Cc. I need to appears the other values. When I do clic on 31020301 QlikView Shows 0. Same thing with 31020302. For 31020303 the formula works fine. But I need the other values.

Thanks!!

22 Replies
pgalvezt
Specialist
Specialist
Author

The final result is -3.156.576. Works fine but the other values the other accounts shows 0.

sunny_talwar

1st of all, I don't see Cuenta = 31020303 in your data:

Cuenta.PNG

2nd, try to see if this expression does what you are trying to do:

=If(Cuenta='31020303' and Cc='4407', Sum({<Año={'2015'}, Cuenta = {'31020303'}, Cc = {'4407'}>} MONTO)*-0.7513, Sum({<Año={'2015'}>}MONTO)* -1)


Output.PNG

3rd let me know if it still doesn't work

Best,

Sunny

pgalvezt
Specialist
Specialist
Author

Sunindia,

Put this formula:

Sum({<Año={'2015'}>}MONTO*-1)-

((Sum(Aggr(If(Cuenta='31020303' and Cc='4407',Sum({<Año={'2015'}>}MONTO*-1)*0.7513, Sum({<Año={'2015'}>}MONTO*-1)),Cc)))-

(Sum(Aggr(If(Cuenta='31020303' and Cc='4400',Sum({<Año={'2015'}>}MONTO*-1)),Cc))))

Gives 3156576... That is correct... but I need the other values as If I were showing just Sum({<Año={'2015'}>}MONTO*-1)



Wooww So Sorry, I Attached a new document with 31020303  included.

sunny_talwar

Now this new qvw file is again asking me for a User ID.

pgalvezt
Specialist
Specialist
Author

I have deleted again the hide script. the idea is to show the other accounts. This result that appear is the correct. but when I do clic in another account qlikview shows 0.

Thanks!

pgalvezt
Specialist
Specialist
Author

Look,

Sum(Aggr(If(Cuenta='31020303' and Subcuenta='' and Cc='4407',Sum({<Año={'2015'}>}MONTO*-1)*0.7513

,Sum({<Año={'2015'}>}MONTO*-1)),Cuenta,Subcuenta,Cc))

This result give me:

4400 = -1.275.160

4407 = -5.683.585

What I want is to subtract -8.840.160 to -5.683.585 = 3.156.576 (Final Result)


Sum({<Año={'2015'}>}MONTO*-1) is -8.840.160


Sum({<Año={'2015'}>}MONTO*-1)*0.7513 is -5.683.585

4400 = must be deleted I think.

pgalvezt
Specialist
Specialist
Author

Could you see the new test qvw?

sunny_talwar

Now it only has just one Cuenta can't see other to test the other scenarios

pgalvezt
Specialist
Specialist
Author

I included the other accounts.

Look,

Sum(Aggr(If(Cuenta='31020303' and Subcuenta='' and Cc='4407',Sum({<Año={'2015'}>}MONTO*-1)*0.7513

,Sum({<Año={'2015'}>}MONTO*-1)),Cuenta,Subcuenta,Cc))

This result give me:

4400 = -1.275.160

4407 = -5.683.585

What I want is to subtract -8.840.160 to -5.683.585 = 3.156.576 (Final Result)


Sum({<Año={'2015'}>}MONTO*-1) is -8.840.160


Sum({<Año={'2015'}>}MONTO*-1)*0.7513 is -5.683.585

4400 = must be deleted I think.

pgalvezt
Specialist
Specialist
Author

Could you see the app?