Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Sunny T,Kush141087,Avinash R,pcammaert,jagan mohan rao appala,
below expression givng me negative values on my bar chart
Formuale:(No of Defects Fixed within 3 days from the date of defect opened / Total number of defects)*100
I want to caluclate % for <=1day
<=2Days
<=3Days
>3days
=Count({<Defect_Aging_Days='<=1'>}Def_ID)/num(count(Def_ID))*100
what wrng in my Exp?
Thanks in advance.
Missing curly brackets.
=Count({<Defect_Aging_Days={'<=1'}>}Def_ID)/num(count(Def_ID))*100
Hi,
Generally count won't give negative values, it always returns a positive value, try below expression
=(Count({<Defect_Aging_Days={'<=1'}>}Def_ID)/count(Def_ID))*100
Hope this helps you.
REgards,
Jagan.
I don't see how you can get negative numbers using counts. But your expression is not correct. Try this instead: Num(Count({<Defect_Aging_Days={'<=1'}>}Def_ID)/(count(Def_ID)*100,'0.0%')
thanx all...but if i use if statmnt i can i implements with in dat
because i want to display in barchart
<=1day
<=2Day
<=3Days
>3Days
How can i ?
Hi,
Create a bucket in script like below
LOAD
*,
If(Defect_Aging_Days > 3, '>3 Days',
If(Defect_Aging_Days = 3, '3 Days',
If(Defect_Aging_Days = 2, '2 Days',
If(Defect_Aging_Days <= 1, '<= 1 Day')))) AS Age_Bucket
FROM DataSource;
Now use Age_Bucket as dimension and use below expresions
=Num(Count(Def_ID)/(count(TOTAL Def_ID)*100,'0.0%')
Hope this helps you.
Regards,
jagan.
the exp shwng error
for ur exprsn givng 1% as we r usng same Def_Id only na..
and i dnt want the value for Def_Id
in script i hve used
Def_ClosingDate - Def_DetectOn as Defect_Aging_Days,
if(Def_ClosingDate - Def_DetectOn <= 1, '1 Day', if(Def_ClosingDate - Def_DetectOn <= 2, '2 Days', if(Def_ClosingDate - Def_DetectOn <= 3, '3 Days','> 3 Days'))) as Defect_Aging_DayBands,
if(Def_ClosingDate - Def_DetectOn <= 7, '1 Week', if(Def_ClosingDate - Def_DetectOn <= 14, '2 Weeks', '> 2 Weeks')) as Defect_Aging_Weeks,
and i need the
%<=1day to <=3days........
Not sure why it is wrong. try
Count(Def_ID)/count(TOTAL Def_ID)
Also check what values you are getting in Age_Bucket field.
Regards,
jagan.
Hi jagan,
PFA in that Days barchart
i wan to display the %values <=1Days to <=3days lik dat abve mentioned