# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for
Did you mean:
Highlighted
Contributor

## Unique count from three different Fields

Dear all,

I need to have the distinct count of three different field (let's say field A, B and C) in one expression.

I know the distinct count of two fields (A and B) in one expression is the following:
=Count(Distinct A) + Count({<B -= p(A) >}Distinct B)

I tried the following for the three field counter:
Count(Distinct A) + count({<B-= p(A)>}distinct B) + count({<C-= p(A)>}distinct C)

Unfortunately, it doesn't work.

Could you help me out? Thanks in advance!

Labels (3)

• ### P function

1 Solution

Accepted Solutions
Highlighted
MVP

## Re: Unique count from three different Fields

May be this

``=Count(DISTINCT A) + Count({<B -= p(A) >}DISTINCT B) + Count({<C-= p(A)+p(B)>} DISTINCT C)``

2 Replies
Highlighted
MVP

## Re: Unique count from three different Fields

May be this

``=Count(DISTINCT A) + Count({<B -= p(A) >}DISTINCT B) + Count({<C-= p(A)+p(B)>} DISTINCT C)``

Highlighted
Digital Support

## Re: Unique count from three different Fields

Roland, did Sunny's post help you get what you needed?  If so, please be sure to return to the thread and use the Accept as Solution button on his post to give him credit for the assistance and to let other Community Members know this worked for you.  If you still need further help, please leave an update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.