Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

QSense
Contributor II

Count

Hello

I have a cloumn let's assume B column İt has 0 and 1 values

Iwant to get ratio of 1 over total values

for instance 18 of them 1

total values 21

ratio 18/21

regards

1 Solution

Accepted Solutions
QSense
Contributor II

Count

=count(if(MT_AVAILABILITY_ACT>0,MT_AVAILABILITY_ACT))/(count (DISTINCT ID_SEGMENT_CLASS))

6 Replies
Employee
Employee

Count

count(if(B=1,B)) / Count(B)

or, using Set Analysis:

Count({$<B={1}>} B) / Count(B)

HIC

Count

Hi,

Use some thing like this to calculate

=count( if ( Column = '1', Column ) )

/

=Count(Column)

then you get the ratio 18/21

HTH

Regards,

Anand

Not applicable

Count

Hi,

Why not use the expression?

= SUM(B) / COUNT(B)

Kind regards,

Matthijs

Count

Hi,

But in case there is any other number other then 1 then condition fails. so i suggest use count if.

Regards

Anand

QSense
Contributor II

Count

My expression is below

if (sum(MT_AVAILABILITY_ACT)>0,'1') it means it is the name of column

When I try it it gives 0

QSense
Contributor II

Count

=count(if(MT_AVAILABILITY_ACT>0,MT_AVAILABILITY_ACT))/(count (DISTINCT ID_SEGMENT_CLASS))

Community Browser