Create a % Contribution Over Time Calculation
I am trying to create a stacked bar chart view that shows the % of each category, for each date, over time.
However, when I try to use the contribution function, the % values returned are calculated for the entire period, not per date.
For example, for the month of 04/2023 the number of "No" users was 171 and the number of "Not Decided Yet" users was 272. I want the chart to show 39% for "No" and 61% for "Not Decided Yet". Instead, the chart shows 10% for "No" and 8% for "Not Decided Yet".
The formula being used is simply: contribution(COUNT([case_id]))
Is there any way to get the view I want?
mmalhame
Posted 1 year ago · Edited 1 year ago·Last reply 1 year ago
4 comments
mmalhame
OP1 year agoYes this worked for me, thank you so much!
DRay
·1 year agoThank you AssafHanina. mmalhame, did that work for you?
Assaf Hanina
·1 year ago · Editedhey mmalhame ,
the contribution function provide the Contribution for the Date Column while the need is to show the Contribution, i.e. percentages out of total, for each category for the same period.
A quick solution which can provide this is to modify the widget formula.
the new formula: COUNT([case_id]) / (COUNT([case_id]),all(Dimension_name))
Formula Explanation:
See example - using simple Count [# of OrderQty]
Using the formula include ALL Function: [# of OrderQty]/ ([# of OrderQty],all([Region]))
the Contribution display for each chart
Best Regards
DRay
·1 year agoHello mmalhame.
Welcome to the Sisense Community!
Thank you for reaching out. Hopefully another Community member is able to help you, but if you don't get an answer in the next day or two I will reach out internally to get you an answer.
Have a great day!