Question

Unable to add a Source Query with pivots

  • 5 June 2019
  • 7 replies
  • 921 views

Userlevel 7
Badge +1

Hi,



I have one query that creates some results with two pivots (count of sessions) and then I create simple table calculation based on both of those values.



I have another query, which is similar just in a different vertical.



While using Merge pre-existing looks by using unique URL of look this I created the URL but I’m getting this error:



image



I’m actually not using the data from the pivots (I have them as Hide from visualisation) but just the table calculations. If I still add the join I’m getting something like this:



image



I understand that there is a Calculations button in the Merged Query window but was wondering whether support for having those table calculations in the existing looks will be added.



Moreover the biggest problem is that I need the pivots. Is there any way to be able to merge queries/looks with pivots?


7 replies

Userlevel 7
Badge +1

That’s something we’re still working on developing.



For this case, even though the pivots are hidden from the visualization, they’re still a part of the query, so they can’t be merged. If there aren’t a bunch of pivot options, you could use filtered measures (custom measures might be a quick workaround!) to achieve a similar result.

Userlevel 7
Badge +1

Thanks Izzy. After sleeping on it I came with fresh mind and realised there’s no point trying to complicate things so I used Custom Measures for now and kept queries apart.



It seemed that if you create explore with pivots and then join them, despite the errors the queries would be merged but any edit to that query would result with the pivot being removed…

That’s something we’re still working on developing.

 

For this case, even though the pivots are hidden from the visualization, they’re still a part of the query, so they can’t be merged. If there aren’t a bunch of pivot options, you could use filtered measures (custom measures might be a quick workaround!) to achieve a similar result.

 

Is this still being worked on? As it’s still a fairly large issue when trying to merge data. Such as a specific shop's sales data over a 3 year period vs the country sales data over the same period? 

 

Userlevel 2

This worked for me last week (merging a source query which included pivots) but this week it’s no longer working 🤔. The original query remains intact but whenever I try to edit it (or recreate it from scratch) the dreaded “unable to add a source query with pivots” message comes back.

This is still not available for the current version of the looker and would be much appreciated for many dfferent sorts of queries. Thanks in advance.

Would be a great adds-on if we can merge pivoted tables. Thank you so much.

Userlevel 7
Badge +1

You can but the pivoting has to happen after the merge. First you need to unpivot your source queries, join them, and then pivot by the dimension you want

Reply