Question

How can I merge 2 queries when one of them is pivoted?

  • 18 October 2021
  • 0 replies
  • 22 views

My objective is to get a stacked bar chart with a line laid on top.

 

Stacked bar chart data looks like this:

Grouped Stage Name -> Lost Won
Month  Booking Value Booking Value

2021-1

1500 1700
2021-2 1200 1000
2021-3 1900 2000
2021-4 1100 2200

 

And in another query I’m calculating for attainment % which doesn’t involve using booking value. In the merged query, I will hide the Won and Lost values.

Month Lost Won Win Rate

2021-1

200 300 60%
2021-2 200 450 69%
2021-3 400 500 55%
2021-4 500 200 29%

 

When I attempt to merge the queries based on the month value, this is what I get:

Month Grouped Stage Name Booking Value Won Lost Win Rate
2021-1 ? [object Object] 300 200 60%
2021-2 ? [object Object] 450 200 69%
2021-3 ? [object Object] 500 400 55%

 

I’m assuming the issue is because of the pivoted table but I’m unsure of how to fix this or any ways to work around this.


0 replies

Be the first to reply!

Reply