Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
suryaa30
Creator II
Creator II

Eliminating records in Straight Table

Hi All,

I have a straight table with a set of dimensions shown. I have count and sum as expressions,

I have records where count is zero but sum having some value in one of the expenses.

I want to remove the records where the count is zero. even though the record has values in one of the expenses.

Count(Claims) -reclamacion

Sum(Hospital Expenses)

Sum(Doctor Expenses)

In below image The fields on left are dimensions and on right are expressions.

doubt1245.PNG

1 Solution

Accepted Solutions
sunny_talwar

Check the attached

View solution in original post

9 Replies
sunny_talwar

Change these two expressions

Sum(Hospital Expenses)

Sum(Doctor Expenses)

to

If(Count(Claims) > 0, Sum(Hospital Expenses))

If(Count(Claims) > 0, Sum(Doctor Expenses))

suryaa30
Creator II
Creator II
Author

Hi Sunny that partially resolves. I forgot to mention the scenario.

--Each record can have a payment type say A or B or C

Now in the straight table I mentioned above the expenses are nothing but Sum(A) or Sum(B) or Sum(C)

In the list box if payment type is selected as 'A'

now that I have implanted what you mentioned above. In the show total I have given sum of rows. But even though all record values are 0 for Sum(B) the total shows total value and that is strange.

d123.PNG

sunny_talwar

Sorry what is A, B, & C? Not sure I understand? Would you be able to post a sample?

suryaa30
Creator II
Creator II
Author

I have attached a sample document.

Now here when I select a particular payment type, I need to see zero in other payment expenses.

D456.PNG

sunny_talwar

So you want the expressions (Reclamacion Count, Siniestro Count, Doctor Expense, Average Doctor Expense, Reembolso Expense, Average Reembolso Expense) to hide when you select Hospital?

suryaa30
Creator II
Creator II
Author

Reclamacion Count, Siniestro Count,will always remain no matter what the selection is.

Hiding of expense is what I have currently implemented.

But I am trying to retain the all Expense fields but show '0' for those expenses when not selected.

here selection is about Payment type list box and not Hospital.

For example:

If reembelso is selected in payment type.

I want the other expense field to show 0.

sunny_talwar

Check the attached

suryaa30
Creator II
Creator II
Author

Hi Sunny,

Thanks Much. Looks ok.

What has been changed and what is the significance?

sunny_talwar

Added an asterisk within your set analysis within the variables.... read about it here

Implicit Set Operators