
1. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
Alec Chen Jun 8, 2017 6:46 PM (in response to Alec Chen)Hoping someone can help soon..

2. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
lei.chen.0 Jun 8, 2017 7:43 PM (in response to Alec Chen)Hello ALEC,
A question.
Alec Chen wrote:
I have a visualization that is ranking a list of Top N partners based on sales
As for "sales", the sales for all the years or the sales for the latest year?
Regards
Lei

3. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
Alec Chen Jun 8, 2017 7:55 PM (in response to lei.chen.0)Hi Lei,
I am looking for the latest (current) year.
Thanks,
Alec

4. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
lei.chen.0 Jun 8, 2017 10:11 PM (in response to Alec Chen)Hello ALEC,
Please refer to the attached workbook.
Please pay attention that, "Others' participates in the ranking.
Regards
Lei

OS_Anon_060817.twbx 431.1 KB


5. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
Alec Chen Jun 14, 2017 1:44 PM (in response to lei.chen.0)Hi Lei,
This solved my issue, thanks for your help!

6. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
Alec Chen Jun 30, 2017 4:25 PM (in response to lei.chen.0)Hi Lei,
Thanks for your help in making this work. Currently the measurement is for the entire year, I would like to incorporate the parameters to have a view based on monthtodate versus LY monthtodate and yeartodate versus LY yeartodate,.
I created a field for MTD, which is functioning as expected
{ FIXED [Merchant]:SUM(IIF(int(str([Current Year])+[Current Month])=[Month454Skey Calculation],[Sales],0))}
I expect LY MTD to be similar, but it is not working:
{ FIXED [Merchant]:SUM(IIF(int(str([Current Year])+[Current Month])=[Month454Skey Calculation],[Sales],0))}
Based on this, I would expect YTD to be this, but it is not working either.
{ FIXED [Merchant]:SUM(IIF(int(str([Current Year])+[Current Month])<=[Month454Skey Calculation],[Sales],0))}
Do you have any ideas?

OS_Anon_063017.twbx 214.1 KB


7. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
praveen p Jul 1, 2017 2:07 AM (in response to Alec Chen)1 of 1 people found this helpfulHi Alec,
please try the below calculation for SUM Sales MTD LY and it will display correct results
{ FIXED [Merchant]:SUM(IIF(int(str([Current Year]1)+[Current Month])=
(INT(STR([FY])+[FY Month Number Calculation])),[Sales],0))}

8. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
Alec Chen Jul 3, 2017 3:49 PM (in response to praveen p)Thank you Praveen, that was a much simpler approach than mine. I'm still having trouble getting yeartodate to work. Does [FY] needs to be FIXED as well? Thanks for all your help.

9. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
praveen p Jul 4, 2017 4:59 AM (in response to Alec Chen)1 of 1 people found this helpfulGlad to help you Alec
Please try the below calculation for YTD
YTD :
{FIXED [Merchant]:SUM(IIF(([Current Year])=([FY])
and ([FY Month Number Calculation])>=([Current Month]) and [Current Month]
<='11',[Sales],0))}

10. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
Alec Chen Jul 5, 2017 2:33 PM (in response to praveen p)Thank you again praveen. I modified the formula by switching the >= condition to <=, and it seems to have worked. I have a question on why the condition for [Current Month] <= '11'? Should it not be '12' to include the last month of the year?

11. Re: Using a Table Calculation (YOY Growth) with Top N / Others Groups
praveen p Jul 5, 2017 11:34 PM (in response to Alec Chen)1 of 1 people found this helpfulIt should include 12 as well Alec as per the [FY Month Number Calculation] calculation Jan was assigned 11 hence compared it with 11 please change the code to 12 or any number as per the requirement.