Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.

Count of Reason Code against PH.


I have an Issue. I have a table box, Where is 6 Fields.

1. PH

2. Reason Code1

3. Reason Code2

4. Reason Code3

5. Reason Code4

6. Reason Code5

For each PH I have some Reason Code. Now I have to find out how many PH have 1 Reason Code ?

How many PH have 2 Reason Code ?

How many PH have 3 Reason Code ?

How many PH have 4 Reason Code ?

How many PH have 5 Reason Code ?

For more details please find the attached excel.



2 Replies
Not applicable

Re: Count of Reason Code against PH.

May be this will help you.



Re: Count of Reason Code against PH.

Hi Kiran,

Can we implented same in this case,


Please find the solution for the same, If the scenario is like this.

1st Condition – I have 2 Dimension – Customer Code and PH, If Customer Code is null please

Ignore by is null function in code or expression.

2nd Condition – How many PH have one reason code and if the PH consists single Reason  Code, then check the Net Collectable Amt. is less then (RA1 or RA2),  and if the condition is true, then assign same Net Collectable Amt. to (RA1 or RA2) where ever Reason Code is available for the Reason Amount.

For Example : -


Here for the same PH have single Reason Code 1 and Also single Reason Amount, But If we will check the net Collectable, It is less than from the Reason Amount 1. Then we have to assign that Net Collectable amount to Reason Amount 1.

i.e. Output


Please find the attached excel for the same.

Please Help me on this as soon as possible.



Community Browser