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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bhupesh_gupta
Creator
Creator

Getting wrong result in Straight table

Hi All

I have one scenario which I am not able to implement.

Data is some thing like this

!

   

PolicyUWRGroupAmount
10011112000
10021113000
10031125000
20041111000
20011111750
20051123000
30051126000

So here a policy can have multiple Group and amount divided between them.

Now if a user selects one group in a list box let's say 112, resultant table should show some thing like this

   

PolicyGroupPaid to 112 total Policy Amount
1400021750
100112500010000
20011230005750
3001126000

6000

But I am getting this

   

PolicyGroupsum(Amount)=sum({<Policy=p(Policy),Group=>}Amount)
1400021750
10011105000
10011250005000
20011102750
20011230003000
30011260006000 

Can some one help me on this.

I have attached the sample app as well.

Regards

Bhupesh

1 Solution

Accepted Solutions
rubenmarin1

Hi Bupesh, maybe with:

=If(not IsNull(Group), sum(TOTAL <Policy> {<Policy=p(Policy),Group>}Amount))

If(not IsNull(Group) --> To show only rows of the selected groups.

TOTAL <Policy> --> To sum all groups amount of the same policy

View solution in original post

5 Replies
rubenmarin1

Hi Bupesh, maybe with:

=If(not IsNull(Group), sum(TOTAL <Policy> {<Policy=p(Policy),Group>}Amount))

If(not IsNull(Group) --> To show only rows of the selected groups.

TOTAL <Policy> --> To sum all groups amount of the same policy

lironbaram
Partner - Master III
Partner - Master III

hi

have a look at the attachment

bhupesh_gupta
Creator
Creator
Author

Hi Liron

Thanks your option works as well

Regards

Bhupesh

bhupesh_gupta
Creator
Creator
Author

HI Ruben

Thanks it worked.

Regards

Bhupesh

rubenmarin1

Glad to help.

The "Policy=p(Policy)" is not needed, as the selections will do that, so:

=If(not IsNull(Group), sum(TOTAL <Policy> {<Group>}Amount))