Insight visual computation help

I am working on a calculation on a insight visual to compute subcategory wise percent difference of profit. For example, if i filter to 2023, it should show 2023 profit for each subcategory and also the percent difference from previous year’s profit.

Note: The screenshots below are superstore sample data.
The below screenshot is the expected result.

But the actual result im getting in Quick Sight is:

  1. without adding percent difference it is correct :
  2. when I add periodoverperiodpercentdifference computation, I’m getting like below

In the 2nd image, it is not giving the percent difference for each subcategory, rather it gives the whole percent diff. For example, for 2023, if it is 16.04%, it gives the same for all subcategory.

Hi @Kripa_Magesh and welcome to the Quick Sight community!

What are your fields that are being used for the period over period computation? Are either of them calculated fields and if so, could you please share?
My thought is that if it’s pulling the entire year rather than by subcategory, you may just need to add an ifelse calculated field that incorporates subcategory.

Thank you

Hi @Brett ,

I used two computations. First one is top ranked to display subcategory along with it’s profit and then used period over period difference with order_date granularity set to year and profit. There are no calculated fields used. The below images shows the computation.

Also, we tried using the below calculation to display the percent difference for each category .
sum(profit,[sub_category]).
However, it’s throwing error when I use it in computation.

Hi @Kripa_Magesh,
Apologies for the delayed response. While looking in to this a bit more, having this exact outcome may be a current limitation on Quick Sight. I believe the best way to achieve this would be to create a calculated field that would aggregate the periodOverPeriod value for each of the categories based on their rank by profit. Then you would have to add each calculated field individually to the insight calculations.

I’ll go ahead and mark this as a feature request as this would be a nice addition to have as more of a simple insight addition!

1 Like