Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help in Expression (Total)

Hi,

The expression which is not working as I am trying to find overall % of each customer, and the expression is as followed and the Tras_No has some duplicate records so when I use TOTAL with Distinct the expression become incorrect, could you please any one suggest workaround for this.

=Count(Distinct(Trs_No))/Count(TOTAL(Distinct(Trans_No)))

Regards

Chriss

3 Replies
Not applicable
Author

try this

=Count(Distinct(Trs_No))/Count(TOTAL Distinct(Trans_No))

Not applicable
Author

also try this

=Count(Distinct  Trs_No)/Count(TOTAL Distinct Trans_No)

jonbrough
Specialist
Specialist

Total for each customer would need to have something like this:

    =Count(Distinct(Trs_No))/Count(TOTAL <Customer> (Distinct(Trans_No)))

Alternatively, I think you can also use the Aggr() function like this:

    =Count(Distinct(Trs_No))/Aggr(Count((Distinct(Trans_No))), Customer)

Jonathan