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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Script calculation

Hello,

I have to do a caculation I think better from Script: I have 1 table called Real I need to calculate 2 lines (Same calculation of excel as example)

If([cc_group_desc            ]='Dpto. Operaciones (Agrosystems)' and [cuenta                    ]='31020303' and Upper([subcuenta                ])='' and [cc                        ]='4400','AB',

If([cc_group_desc            ]='Dpto. Operaciones (Agrosystems)' and [cuenta                    ]='31020303' and Upper([subcuenta                ])='' and [cc                        ]='4407','AB',

Each line brings a number. Example cc=4407 brings for January 7.565.000 and 4400 brings 0 for January.

The calculation is (Line 1 + Line 2) - Line 2 * 0.73513

It would be (0 + 7.565.000) - 7.565.000 * 0.73513 = 1.881.416( Final Calculation)

How to do this in the script?

Thanks!

3 Replies
pgalvezt
Specialist
Specialist
Author

Hi,

Any help?

Thanks!

pgalvezt
Specialist
Specialist
Author

Hi,

Anyone can help me with this?

Thanks!

miikkaqlick
Partner - Creator II
Partner - Creator II

Hi!

Try something like this:

=(Above(Sum({$<Detalle_EERR={'AB'}> }Real) *-1)+Sum({$<Detalle_EERR={'AB'}> }Real) *-1) - (Above(Sum({$<Detalle_EERR={'AB'}> }Real)) * 0.73513)

It needs more finishing, but I don't have time now.

Br,

Miikka