Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dual Y Axis Line Chart

Hi there,

 

In the March 2020 update, the "Y2" axis was added for the line chart, which is great. This allows for a dual axis line chart.

My scenario is I have a data source with just three columns, a TimeStamp, Tag and Value Column.

What I'd like to do is associate the values of one specific tag with the left Y axis, and the values of another specific tag with the right axis, to see the relationship between them (Power and Speed).

Again, the values for each tag are contained in the same column.

 

The issues I've having is I can't move the "Value" column to both Values and Y2.

Axis = Timestamp, Legend = Tags, Values = Value, Y2 = ?.

 

So I suppose I need a way to sort the Values of the second tag into Y2 somehow, but i'd like to do that without impacting the data source.

  • Hi Anonymous ,

     

    You need to create a measure for each of the Y-axis you need something similar to:

     

    Speed = CALCULATE(SUM(Table[Values]); Table[Tags] = "Speed")
    Power = CALCULATE(SUM(Table[Values]); Table[Tags] = "Power")

     

    Then use this measures on the Y values, don't use the legends.

     

    If you have more than one tag per line you must use this measures:

    Speed = CALCULATE(SUM(Table[Values]); Table[Tags] in {"Tag1", "Tag2"})

     

2 Replies

  • Hi Anonymous ,

     

    You need to create a measure for each of the Y-axis you need something similar to:

     

    Speed = CALCULATE(SUM(Table[Values]); Table[Tags] = "Speed")
    Power = CALCULATE(SUM(Table[Values]); Table[Tags] = "Power")

     

    Then use this measures on the Y values, don't use the legends.

     

    If you have more than one tag per line you must use this measures:

    Speed = CALCULATE(SUM(Table[Values]); Table[Tags] in {"Tag1", "Tag2"})

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for responding Miguel,

       

      I'll take another stab at this, for the moment i just overlayed the two graphs and that's sufficient for now.