Question

Summing over multiple pivots

  • 20 January 2021
  • 0 replies
  • 30 views

Userlevel 3

HI

I have a table with multiple pivots (as in the screen shot below), and I need to calculate a ratio of sums of different columns - I dont know how to have the pivot_where() functions to achieve this.

 

In layman's terms I need the numerator to be the sum of all the product types where is Approved = yes.
The denominator to be the sum of all the column, except where say product ‘Flex’ is ‘no’.

Then the ratio between these 2 values.

 

Hope that makes sense...its for a rather convoluted business rule for a KPI.


0 replies

Be the first to reply!

Reply