Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
=count(if(MT_AVAILABILITY_ACT>0,MT_AVAILABILITY_ACT))/(count (DISTINCT ID_SEGMENT_CLASS))
count(if(B=1,B)) / Count(B)
or, using Set Analysis:
Count({$<B={1}>} B) / Count(B)
HIC
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
Hi,
Why not use the expression?
= SUM(B) / COUNT(B)
Kind regards,
Matthijs
Hi,
But in case there is any other number other then 1 then condition fails. so i suggest use count if.
Regards
Anand
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
=count(if(MT_AVAILABILITY_ACT>0,MT_AVAILABILITY_ACT))/(count (DISTINCT ID_SEGMENT_CLASS))