Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table as below.
Name | Type | Amount | Gain% |
A | AA | Address1 | b |
B | BB | address2 | |
C | AA | address3 | |
I need to write a condition for Gain % in a Straight Table (Expression).
pls find the excel condition given below. I need to write the below expression in Qlikview.
b = IF ( OR(address1= "", sum(address1:address3)=0),"", (address1*100)/(address1:address3)
Can anyone help me with this ?
Thanks,
Praveen
formula would look like:
=if(sum(Amount)=0 or sum(total Amount)=0,'',(Amount)/sum(total Amount))
please share what you want or the logic. Addess1 cannot be added to address2 as mentioned in the Excel expression as these are alpha numric.
More over, The excel formula is not write it has errors!
in simple mathematics, what is the formula of Gain% ?
Name | Type | Premium | Gain% |
A | AA | 1000 | |
B | BB | ||
C | AA | 1500 | |
Totals |
I guess this can help you people to understand my question. Actually the column "Premium" may have empty cells also, So If the cell is empty or The total Premium is null, then it should return "Null" or 0. Or it should display a values by calculating Gain %.
So based on your listed columns ( Name,Type,Premium) how do you compute for Gain%?
Please find the sample attached file.
Hope this will solve your problem.
formula would look like:
=if(sum(Amount)=0 or sum(total Amount)=0,'',(Amount)/sum(total Amount))
Exactly Jonathan. You got it Ryt. The interpretation is ryt.
But how can I write it in Qlikview. I dont have a column or a value for Total Amount.
Sorry Pradnya, I couldnt open your file.
Okay.
You can use below expression for Gain %:
=if(sum(Amount)=0 or sum(total Amount)=0,'',(Amount)/sum(total Amount))