Hello I’m trying to calculate Out of Stock(OOS) percentage for each company in quicksight.
I added calculate field to calculate the percentage
Numerator= sum(OOS GV)
Denominator = sumover(sum(GV),[Company])
perc= Neumerator/Denominator *100
Now I get something like this…
Now I do not have the need to see Instock Perc, so when I exclude Instock, it is also excluded from calculation like this…
I tried using different combinations of PRE-FILTER, PRE_AGG and POST_AGG_FILTER to keep the total value, but it doesn’t work.
Now I cannot find any option to edit this filter of excluding Instock value just for visuals, but not for the calculation. But I also have to have filter calculation values for Year, Month, Country etc.(which are pinned to top on sheet),but I just don’t want to display Instock and consider it for calculation.
I want a similar result(when I add more granularity within the pivot table)
Thank you for helping nshah, but I think that thread is not solving my problem, of hiding a column but still considering it for calculation., considering page level filters. I may be wrong, as i am a beginner, but can you suggest the solution in detail please?
@Akash1 , based on the screenshot, looks like you want to hide the rows, is that accurate? If yes… It’s probably not possible. I also don’t see how else it cab be achievable by any BI tool, Unless I still don’t understand your problem…
Yes, I want to hide the row for instock perc, my team has many dashboards, where we only see the OOS perc and not the instock perc. But I cannot check the architecture of these dashboards, so I thought it would be possible
No @duncan , actually the Instock and OutofStock is in the same column, so when I hide Instock values, they are removed from the calculation. I solved this problem by following steps
Numerator=Sum(GV)
Denominator= sumOver({GV},,PRE_AGG)
Rank= ifelse(Inventory=‘instock’, 2,1)
and Perc= Numerator/Denominator
and then I applied a top and bottom filter, to show top 1 values from Rank, this eliminated the instock values from the visualization, but not from calculation.