Creating a 'set' of pivots

  • 1 April 2019
  • 3 replies

Userlevel 5

Hi there,

I have a dimension with values ( let’s say a,b,c,d,e). I have an ask from specific users to present them in very specific ways on the same viz on a pivot: first column would be the aggregate of the first three values (a or b or c should be included in that column or row’s results), then after that each individual value in their own columns/rows, then the next two values (d or e should be included in the column’s results), then individual columns for d and e. Has anyone done this kind of cohorting before? Any guidance would be majorly appreciated. Thanks in advance!

3 replies

Userlevel 6

Now this might well be a poor way of doing this but my initial thinking is this:

Since you are displaying the same data in multiple buckets you will need to actually duplicate the data somehow. I would create a mapping table which would explode the data out. So value A is part of for example (value A, value A&B, value A&B&C&D&E), join into explore using the dimension value. Now pivot by the category. You would need to maintain this mapping table though.

I am sure someone will give you a way of fudging this using custom dimensions though.

Userlevel 5

Ian, thanks for your help! Unfortunately, I think the nature of manual sorts like this is that it’s always going to be a maintenance task, so the mapping table is likely my best bet in the absence of something better. Cheers!

Userlevel 3

I often need to do things like this.

You can either create new measures using filters, or use table calculations using pivot_where and/or pivot_index and/or index functions.

I am still trying to figure out the difference between pivot_index and index?
I am also trying to figure out how to work with multiple pivots at the same time.