Forum Discussion
QuantumLP
4 years agoFrequent Visitor
Line chart showing higher values below lower values
I have a line chart which shows current year vs same period last year, but for some reason, when the value is higher than the current year, the line shows much below the actual value on the chart whi...
vgferreira
2 years agoNew Member
The problem happens because for each line and different measurement, the maximum of the Y axis is different.
The solution I found was to create a measurement for the Y axis, in this measurement I look at which maximum value is the greatest between the two line measurements and choose it as a result to have the same value for both lines.
#Y_axis_MaxValue_Productivity_Evolution_Current_Year_Chart =
var maxActual = CALCULATE(MAXX(f_kvi_summary_produtividade,[#produtividade/hr]))
var maxGoal = CALCULATE(MAXX(f_kvi_summary_produtividade,[#meta/hr]))
var calcMax = IF(maxActual > maxGoal, maxActual, maxGoal)
return calcMax