Hi @duncan ,
Thank you for providing a solution. I tried the calculation you provided, but I am still facing issues getting the required result.
Please find attached link to the dashboard in Arena
[License Reporting] (https://community.amazonquicksight.com#Arena-dashboardId=894525b5-29fc-4a5a-bfac-6fe4ff7fa456&authorId=CU-8779)
Let me re-explain the problem so that you have clarity of what exactly I need.
The # of License column shows the user accounts created, due to which I did a distinct count using company name to get the total licenses sold each year which is my 1st calculation
`Calculation 1`
# Licenses Sold Each Year
distinct_count({Company Name}, [{Created Date}])
My 2nd calculation is the cumulative total which I created using RunningSum
`Calculation 2`
# Cumulative Totals
runningSum ( sum(distinct_count({# of License}, [{Created Date}, {Company Name}])), [{Created Date} ASC] )
My 3rd calculation is created using the lag function
`Calculation 3`
lag({Cumulative Totals},[{Created Date} ASC],1)
All these 3 calculations I now show on a stacked combo bar chart.
The next graph I created is a donut chart, which should show me running sum split by license type. Here I used the calculation you provided.
`Calculation 4`
# Donut Chart
runningSum(sum(ifelse(extract('YYYY', {Created Date}) <= ${Year}, {# of License}, 0)), [{License Type} ASC])
But, if you see the # of Licenses is actually the count of users account created. License sold is only 1 per company. So as soon as I add a distinct count in this Calculation 4 #. I get wrong result.
Another problem, if you see the data each license type is not sold every year. Eg. In year 2012 - 1 Eternal License and 1 Echo License was sold. In 2015 2 Time-Wrap License were sold, so going back to the stacked combo bar chart, when I click on the year 2015. I want to see in the donut chart 1 Eternal License, 1 Echo License and 2 Time-Wrap License. Showing the total as 4 Licenses in the donut chart totals
And the parameter ${Year}
is an integer which passed value as 2024.
Thank you for your help in advance.
Thanks,
Akshay