Reorder Calculated Fields in Line Graphs

brandon4
Participant I

Hi, I have a visualization here based on a few calculated fields. The blue and red are repeated for each pivot, and the green line is the trailing 12 months average (mean(pivot_row(field))), so it aggregates a subset of the rest. Ideally, I’d love to see the green at the front of the visualization, as it’s the only one that would get called out specifically, but it’s hidden for the most part. I can’t shift the aggregated calculated field over to the left of other fields- is there another way to bring green to the front? Thanks!

66555533-43e2-4ab1-83d2-489956a73200.png
0 5 361
5 REPLIES 5

Dawid
Participant V

Looks like soundwaves 😄  I think the problem is that Table Calculations are plotted at the end, hence it gets sent to the back. There doesn’t seem to be a way to bring it to the front.

Hi @brandon4 ,

As a workaround, you could add in some table calculations that exactly match the measures that you’ve already brought in, and then hide the original measures from your visualisation. Then you can move your trailing 12 month average table calculation to come before the new table calculations, e.g.,

a48f9793-7684-40a8-96ab-3d0e09152b8b.png

Please let me know if you have any questions.

Best wishes,

Shaan

brandon4
Participant I

Hi @shaandalwadi , thanks for the suggestion! I totally see where you’re going with bringing the measures over to the right by replicating them as calculations. What I’m struggling with is that my calculations are pivoted for each line here, then the green ttm line is an average of all columns in each row. So the ttm is stuck on the far right whereas the other calculations are distributed between each pivot. Let me know if I can explain that further. 

It would be awesome if there was just a ‘graphical series order’ option in the edit section where you could bring each field forward or back in line and area graphs. 

Hi @brandon4,

I see - that makes sense. Unfortunately as Dawid says, there isn’t a way to bring table calculations ahead of measures in the plotting order. The two ways around it would be to either (1) rewrite the measures as table calculations which, as you pointed out, does not seem possible here, or (2) to rewrite the table calculation as a measure. (2) may be possible by writing it as a subquery in the sql parameter (example of this in the screenshot below) so it may be worth exploring that to see if it’s possible.

5d4d7042-e221-43fd-8763-57814816c78d.png

Sorry I couldn’t be more help here!

Best wishes,

Shaan

Dawid
Participant V

Just be mindful that this query would be execute per row basis but with some caching and partitioning on status, you could avoid problems

Top Labels in this Space
Top Solution Authors