calculated columns - Cross table in Spotfire -


*update based on ksp's answer (thank that, looking for.)

can me following problem.

given data table:

key     rec     period  dow    category value  key1    rec1    period1 dow1   kpia     x1     key1    rec2    period1 dow1   kpib     z1 key1    rec3    period2 dow1   kpia     y1   key2    rec4    period1 dow1   kpia     x1       key2    rec5    period1 dow1   kpib     z1 key2    rec6    period2 dow1   kpia     y1   key1    rec7    period1 dow2   kpia     x2       key1    rec8    period1 dow2   kpib     z2 key1    rec9    period2 dow2   kpia     y2   key2    rec10   period1 dow2   kpia     x2       key2    rec11   period1 dow2   kpib     z2 key2    rec12   period2 dow2   kpia     y2 key1    rec13   period1 dow1   delta    d1 key1    rec14   period1 dow2   delta    d2 key2    rec15   period1 dow1   delta    d3 key2    rec16   period1 dow2   delta    d4 

in spotfire, possible create following cross table:

              avg(kpia)          avg(kpib)      delta          period1     period2      period1       period1                         dow1 dow2   dow1 dow2    dow1 dow2     dow1  dow2        key1    x1   x2     y1   y2      z1   z2      d1    d2 key2    x1          y1   y2      z1   z2      d3    d4 

now there want change in cross table can’t manage figure out how:

delta column valid period1. possible apply period , dow level columns of cross table?

so want is:

              avg(kpia)          avg(kpib)       delta          period1     period2      period1                 dow1 dow2   dow1 dow2    dow1 dow2     key1    x1   x2     y1   y2      z1   z2      (d1 + d2) / 2  key2    x1          y1   y2      z1   z2      (d3 + d4) / 2  

and when dow2 filtered out:

              avg(kpia)         avg(kpib)        delta          period1     period2      period1                   dow1        dow1         dow1      key1      x1          y1           z1             d1 key2      x1          y1           z1             d3     

thanks in advance.

@ user6076025 - please check solution , let me know if helps.

i have considered x 1, y 2 , z 3 computation purpose.

i have unpivoted data there in first screenshot of post , created cross table unpivoted data.

attached screenshots reference.

unpivot data

cross table unpivoted data


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -