Hello
I am trying to return a list of products as my values for whatever time period I have selected, that makes up the top 50% of volume. I want the ability to be able to show multiple weeks on a visual but be able to see by item what's driving sales each week and how often they're the top drivers throughout the year. If the top 4 items account for 49.999% I still want it to return the 5th item, needs to return at least 50% of volume. I tried doing a rankx first as a variable and then a calculate but was having issues getting it to work correctly. Please see the below example, any ideas or thoughts would be greatly appreciated!
I am trying to return a list of products as my values for whatever time period I have selected, that makes up the top 50% of volume. I want the ability to be able to show multiple weeks on a visual but be able to see by item what's driving sales each week and how often they're the top drivers throughout the year. If the top 4 items account for 49.999% I still want it to return the 5th item, needs to return at least 50% of volume. I tried doing a rankx first as a variable and then a calculate but was having issues getting it to work correctly. Please see the below example, any ideas or thoughts would be greatly appreciated!
Input | |||
ProductID | Sales $ | Week | % OF Total |
C | 91 | 1 | 20% |
I | 84 | 1 | 19% |
B | 77 | 1 | 17% |
D | 64 | 1 | 14% |
G | 45 | 1 | 10% |
A | 27 | 1 | 6% |
H | 26 | 1 | 6% |
E | 21 | 1 | 5% |
F | 15 | 1 | 3% |
B | 99 | 2 | 18% |
D | 99 | 2 | 18% |
F | 96 | 2 | 18% |
C | 84 | 2 | 15% |
A | 63 | 2 | 12% |
H | 42 | 2 | 8% |
E | 41 | 2 | 8% |
G | 14 | 2 | 3% |
I | 8 | 2 | 1% |
Output (If Viewing Week 1) |
ProductID |
C |
I |
B |
Output (If Viewing Week 2) |
ProductID |
B |
D |
F |