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: 
Not applicable

Problem in Expression SUM

Hi,

I have the following straight table. The Selection column is a calculated expression and Prejected losses is having the same value as Selection, the only difference is, the values are Accumulated.

My issue is, when I am deriving the next column i.e. Stat asEX, the calculation should be, (Max value of Projected Exposure) - each row of Projected Exposure. I have tried to use SUM(Selection) to get the Max value of projected exposure, but always get 0.

Chart.bmp

Can somebody please help me to resolve this issue.

Thanks,

Sudip Sen

5 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Try like this

$(=Selection expression)-[Projected Exposure]

Not applicable
Author

Hi,

Thanks for your reply. I have tried the solution you suggested, but the answer is not coming as expected.

Chart 1.bmp

The values should come as given below:

Selection              Projected           Stat asEX
  Losses

14,000,943            14,000,943           3,031,756       Logic - 17,032,699 - 14,000,943
840,668                14,841,611           2,191,088       Logic - 17,032,699 - 14,841,611
863,750                15,705,361           1,327,338       Logic - 17,032,699 - 15,705,361
300,726                16,066,087           966,612          Logic - 17,032,699 - 16,066,087
393,300                16,399,386           633,313          Logic - 17,032,699 - 16,399,386
245,670                16,645,057           387,642          Logic - 17,032,699 - 16,645,057
275,179                16,920,236           112,463          Logic - 17,032,699 - 16,920,236
112,463                17,032,699           0                    Logic - 17,032,699 - 17,032,699

Thanks,

Sudip

CELAMBARASAN
Partner - Champion
Partner - Champion

What expression you are used  for Selection?

Not applicable
Author

Its a calculated field and the formula is :

if(isnull(Column(2)*Column(4)),0,Column(2)*Column(4))

+

if(isnull(Column(3)*Column(5)),0,Column(3)*Column(5))

amien
Specialist
Specialist

how about:

BOTTOM(COLUMN(1))

where column(1) is your projected losses