1 of 1 people found this helpful
Você vai ter que calcular por fora em um campo calculado, mas não dá
para responder sem saber como calcular a parte azul e a laranja.
Qual a conta da medida e o que está na cor?
Em 14/04/2016 21:58, Renato Rocha escreveu:
TABLEAU SUPPORT COMMUNITY
HOW TO CALCULATE DIFFERENCE IN 2 LINE CHARTS ?
criado por Renato Rocha em Forums - Visualize a discussão completa
Please can you share the workbook if possible?
you can use the LOOKUP function for this.
If you use SUM([YourValueField)-LOOKUP(SUM([YourValueField]),1) and then make sure that the table calculation is sent across the dimension that is splitting your bar chart in two you'll get the difference between the two values.
If the underlying data is already a percentage that will be enough, otherwise you'll need to divide it by the total sum of the two bars which you'll get from the WINDOW_SUM(SUM(YourValueField))
so the final calculation will be
(This will produce half the rows as null because only one of the bar chart segments can lookup 1 field further forward, but that's OK because you want fewer points in the line chart than the bar)
Hope this helps
marketsharedifference_extract.twbx 104.4 KB
Excellent. This works perfectly fine.