
1. Re: Estimate Calculation
maneesh.gaddam Oct 4, 2018 11:34 AM (in response to Vandana Samtani)Vandana,
Take a look at the attached and let me know if you have any questions.

Sample2.twbx 38.1 KB


2. Re: Estimate Calculation
Hari Ankem Oct 4, 2018 11:40 AM (in response to Vandana Samtani)Does this look right?
Here are the calculated fields:
Calculation1:
IF
{SUM(IF [Code]=4 THEN [Shipments] ELSE 0 END)}
/
{SUM(IF [Code]=4 OR [Code]=5 THEN [Shipments] ELSE 0 END)}
<0.75 THEN
0.75
ELSE
{SUM(IF [Code]=4 THEN [Shipments] ELSE 0 END)}
/
{SUM(IF [Code]=4 OR [Code]=5 THEN [Shipments] ELSE 0 END)}
END
Estimated POS: {SUM([Units])}/[Calculation1]
Workbook is attached. Hope this helps.

Sample2.twbx 69.5 KB



4. Re: Estimate Calculation
Hari Ankem Oct 4, 2018 7:05 PM (in response to Vandana Samtani)Attaching a 10.2 version.

Sample2_v10.2.twbx 73.3 KB


5. Re: Estimate Calculation
Vandana Samtani Oct 4, 2018 9:59 PM (in response to Hari Ankem)Thanks Hari!
Can you please let me know why am i getting the error in above screen shot?
Thanks,
Vandana

6. Re: Estimate Calculation
Hari Ankem Oct 4, 2018 10:28 PM (in response to Vandana Samtani)You need to show the formula you have written. Then only I can answer. Otherwise, the error message is pretty clear.

7. Re: Estimate Calculation
Vandana Samtani Oct 5, 2018 3:13 PM (in response to Hari Ankem)Thanks Hari!
Below is the code I have written and i fixed the error too.
The only issue is when i place this on a dashboard I do not see any results.
Can you please let me know what's happening?
Thanks,
Vandana
IF
(IF ATTR([code]) = 4 THEN ([Net Shipments]) END)/
(IF ATTR([code]) = 4 or ATTR([code]) = 5 THEN [Net Shipments] END)
< 0.75 THEN 0.75
Else
(IF ATTR([code]) = 4 THEN ([Net Shipments]) END)/
(IF ATTR([code]) = 4 or ATTR([code]) = 5 THEN [Net Shipments] END)
END

8. Re: Estimate Calculation
Hari Ankem Oct 5, 2018 4:48 PM (in response to Vandana Samtani)Do yourself a favor by attaching your packaged workbook here. I have no idea what you have written for Net Shipments.

9. Re: Estimate Calculation
Vandana Samtani Oct 5, 2018 5:54 PM (in response to Hari Ankem)Here you go.. Attached is the workbook.
I cannot share the actual data so created a sample file.
Net shipments is a calculated field.
sum([Gross Shipments])sum([Returns])
The calculation below should be 3202500/3963500 ==> 0.80
Thank you again for your help,
Vandana

Sample 1.xlsx 9.3 KB

Sample3.twbx 12.4 KB


10. Re: Estimate Calculation
Hari Ankem Oct 5, 2018 6:18 PM (in response to Vandana Samtani)
Sample3.twbx 26.6 KB
