Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing points between 2 metrics in script ...

So..I have 2 metrics as below

Target : 3.8

Actual : ((sum(Cost * 100)/sum(Revenue)))

and below is my metrics...I am messing up with  parentheses here..can anyone help me..

if((sum(Cost * 100)/sum(Revenue)) < = '3.8',5,

if(((sum(Cost * 100)/sum(Revenue)) > 0 and (sum(Cost * 100)/sum(Revenue))) <= '4',3,

if((sum(Cost * 100)/sum(Revenue)) > '4.1' ,1 ))) as [Real Estate  Rate]

Thanks much

3 Replies
Anil_Babu_Samineni

Can you please let me know

You want Cost * 100 of sum OR Sum(Cost)*100 ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vishsaggi
Champion III
Champion III

May be this:

= if((sum(Cost)/sum(Revenue)) * 100 <= 3.8, 5,

if((sum(Cost)/sum(Revenue)) * 100   >  0 and (sum(Cost)/sum(Revenue))*100 <= 4, 3,

if((sum(Cost)/sum(Revenue)) * 100   >  4.1 ,1 ))) as [Real Estate  Rate]

sunny_talwar

This seems like something which is done in the script... because of the as [Real Estate Rate]. Are you using Group by?