Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
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.
Not applicable

Count number of values/strings and divide them

Hello

I'm trying to create a Barchart where I want to count the number of values/strings in two fields and then divide one with the other. Example, Bikes per person.

If i have one field containing the bikes and every row is a description of a bike owned by a person, every person is the id number of a person.

I've tried the count(Bikes)/Count(Persons), but this just gives me "1" on the barchart as a value, and I know this is not the correct value. Both fields are primary keys if it matters.

Any suggestions on how I can make this work?

Thanks in advance!

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Count number of values/strings and divide them

Use distinct.

count(distinct Bikes)/Count( distinct Persons)

Not sure about syntax, look it up.

1 Reply
Not applicable

Count number of values/strings and divide them

Use distinct.

count(distinct Bikes)/Count( distinct Persons)

Not sure about syntax, look it up.

Community Browser