-
1. Re: Fee calculation
Tom WJul 20, 2016 8:08 AM (in response to Emanuele Daloiso)
Hi Emanuele,
Your formula at the start is invalid.
You are writing
IF something = something AND
ELSEIF
It needs to be either;
IF something = something AND somethingelse = somethingelse THEN dothis
ELSEIF
or;
IF something = something THEN dothis
ELSEIF
-
2. Re: Fee calculation
Emanuele Daloiso Jul 20, 2016 8:41 AM (in response to Tom W)Hi Tom,
thanks for your reply.
I've changed the formula in the following but it seems still uncorrect.
IF YEAR([DATA FATTURA])=YEAR(TODAY()) AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) <= 5000 THEN 0.15
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY()) AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) <= 10000 THEN 0.18
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY()) AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) > 10000 THEN 0.2
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY())+1 AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) <= 5000 THEN 0.15
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY())+1 AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) <= 10000 THEN 0.22
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY())+1 AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) > 10000 THEN 0.25
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY())+2 AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) <= 5000 THEN 0.22
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY())+2 AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) <= 10000 THEN 0.28
ELSEIF YEAR([DATA FATTURA])=YEAR(TODAY())+2 AND RUNNING_SUM([Fatture (++XYZ BI)].[FATTURATO YTD]) > 10000 THEN 0.35
END
I'm afraid the year invoice part is bringing to the error.
What do you think?
Thanks,
Emanuele
-
3. Re: Fee calculation
Tom WJul 20, 2016 8:51 AM (in response to Emanuele Daloiso)
It's impossible for me to tell without knowing what the error is, where the error occurring and being able to apply this to some sample data. Please upload a Tableau Packaged Workbook so I can replicate.
-
4. Re: Fee calculation
venkatesh.sharma Jul 20, 2016 8:54 AM (in response to Emanuele Daloiso)Try to use Sum inside running_sum (Since they must be aggregated)
-
5. Re: Fee calculation
Emanuele Daloiso Jul 27, 2016 7:13 AM (in response to Tom W)Hi Tom,
please find packaged workbook attached.
Thanks,
Emanuele
2016-07-20 17:51 GMT+02:00 Tom W <tableaucommunity@tableau.com>:
Tableau Support Community
<https://community.tableau.com/?et=watches.email.thread>
Fee calculation
reply from Tom W
<https://community.tableau.com/people/tom.w?et=watches.email.thread> in
Forums - View the full discussion
<https://community.tableau.com/message/511349?et=watches.email.thread#511349>
-
XYZ report.twbx 826.7 KB
-