I am trying to create a line graph with two y-axes because they require different scales. I am currently using the QuickChart pack, and the formula is as follows, but it is coming up as ‘formula issue’. Appreciate any direction on the correct formula to do this.
Current fomula:
QuickChart::Chart(
“line”,
[12 Week Tracking].[Week Number],
“png”,
800, 400,
“white”,
“Weekly Variance £”,
[12 Week Tracking].[Weekly Cost Variance Score]
.FormulaMap(CurrentValue.WithNamedValues({ yAxisID: “y” })),
“Variance %”,
[12 Week Tracking].[Variance v Estimate]
.FormulaMap(CurrentValue.WithNamedValues({ yAxisID: “y1” })),
chartOptions: {
type: “line”,
options: {
scales: {
y: {
id: “y”,
type: “linear”,
position: “left”,
display: true,
beginAtZero: true,
title: { display: true, text: “£” }
},
y1: {
id: “y1”,
type: “linear”,
position: “right”,
display: true,
beginAtZero: true,
grid: { drawOnChartArea: false },
title: { display: true, text: “%” }
}
}
}
}
)
