Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts,
I'm working on app where I'm suppose to display a table 3 columns
promotion category, number of sales for category and percentage of sales for each category (This will add to 100% for all categories.).
There could be sales that does not belong to any of the promotion categories. There are additional filters to fileter on year, month, region etc.
I was not able to write formula to calculate percentage of sales for each category. Please advice me on this.
Thanks,
krishna
Krishna,
Try this:
sum(total <promotion_category> sales)/sum(sales).
Regards,
Kiran.
Thanks Kiran.
Problem with the formula is that when Sum(sales) , this will get all sales including those that does not belong to any category.
I need percentage of sales for each category within the promotion sales only. ( excluding non-promotional sales).
Hi Krishna,
you could use Set analysis sum(${<[promotion_category] = {'*category*}>}sales)/sum(sales).
Add set analysis on promtion category to filter null values {<promotion_category-={''}>}. Actually in my expression numerator and denominator should be interchanged.
Kiran.
If [Promotion Category] is a dimension in your chart, the expression would be:
sum(Sales) / sum(TOTAL Sales)
-Rob