Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have a issue on below conditon .......
= sum (if(id=5,value) * if(id=10,value))
id = 5 is Qty
id = 10 is Rate
The above condition is showing zero....
Can any one help me...
Regards,
Antony.
Dear Anand,
ID = 10 is Rate and ID = 5 is Qty.
Dear Akbar,
i tried this, it's showing more than my actual output.
Pls see the eg. which i showed on above.
Regards,
Antony.
Hi,
You might be having NULL record in the "value" column. Convert it to 0.
Below expression may work,
=sum (if(id=5,if(isnull(value), 0, value)) * if(id=10,if(isnull(value), 0, value)))
Thx
Satya
Antony Napolean,
In a multiplication let us say e.g. A * B. If any of A or B is zero then the product will be zero.
Your condition will always be zero : sum (if(id=5,value) * if(id=10,value)). Is it possible a single line have two values for the field id. The answer is not.
A simple solution is break the table into two tables.
Prod_code Rate_Id Rate
1 10 5
2 10 10
3 10 15
4 10 20
5 10 25
Prod_code Qty_ID Qty
1 5 5
2 5 4
3 5 3
4 5 7
5 5 8
Now the required formula is = sum (Rate * Qty)
Hope this helps!
Regards
MultiView
Dear Satya,
Your expression is showing zero on my application.
Try this
(sum(if(ProductID='A',Number))) * (sum(if(ProductID='D',Number)))
if not doing just post a sample
Thanks.
I already posted a sample. Pls see above.
Hello Antony,
Still I'm confuse in your query and explaination. What is the dimension you are consider in the charts ? Because the expression what you are trying to develp is wrong. How can you consider two conditions at a time for a single column in expression.
If condition works record by record of column. We can't develop two conditions to work as single point. Please let us know what is the output you want to see based on input you mention.
In your condition you are trying to get sum of value where Id=10 it is fine. But at same level you are trying to get sum of value where Id=5.
You can go with set analysis.. If you take ProductCode as dimension and expression as
Sum({<Id={10}>}Value)* Sum({<Id={5}>}Value)
Cheers!!
Jagan
Hi Jagan,
Pls find below my eg.
| Product code | Id | Value |
| 1 | 10 | 5 |
| 2 | 10 | 10 |
| 3 | 10 | 15 |
| 4 | 10 | 20 |
| 5 | 10 | 25 |
| 1 | 5 | 5 |
| 2 | 5 | 4 |
| 3 | 5 | 3 |
| 4 | 5 | 7 |
| 5 | 5 | 8 |
My output is 450.
I want to show the total sales.
for my sales formula is Sales = (Qty * Rate). i have qty and rate both values in one field. so i need to separate the qty and rate by using id 5 and 10.
I need the above output 450 , how will i get ?.
Regards,
Antony
You can go with set analysis.. If you take straight table ProductCode as dimension and expression as
Sum({<Id={10}>}Value)* Sum({<Id={5}>}Value).
Now in Expression tab of ST -> Total Mode as Expression Total. Now you can see total count in top of expression.
Cheers!!
Jagan