Hi Everyone,
I have a requirement to find the contribution percentage of sales for all the weeks of a year based on top n parameter. For example, if top n is set to 5, then the pivot table should display contribution percentage of that value for top 5 regions.(columns will have report year ).
Numerator : sum of sales partitioned by region,year,week
Denominator: sum of sales partitioned by only year and week.
Both numerator and denominator should filter by week_category parameter. For example, if week_category_parameter = +6 weeksâ , then the numeratorâs calculated field should use the condition.
Eg: ifelse(week_category_parameter=â+6 weeksâ,sumif(sales,week_category=â+6 weeksâ),week_category_parameter=â+7 weeksâ,sumif(sales,week_category=â+7 weeksâ,NULL) (*this calculated field should be partitioned by region,year,week)
The same applies for denominator by filtering the week_category_parameter, but the denominator should be partitioned by year,week.
Then , divide numerator by denominator which is a percent value (contribution %) and this should filter by top n region parameter.
Iâm not able to create calculation for the above scenario.For testing purpose,I tried to test if numerator and denominator are correct in a table first. I am able to get the numerator value correct by adding year,week,region,numerator. But in the same table, when I add denominator, Iâm getting the same value as numerator because there is region field added(but denominator should give value based on only year and week).
Kindly help me with this requirement.