Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to display 12 months of data in a line chart by using AGGR() in set expression. however, it works well in a table but in line chart it doesn't display as needed.
For instance, my expr - avg(aggr(sum({<year={'Curr Year'}>} Sales),DeptName) gives the right value in a straight table with Month as Dimension
How can I get it to work in a line chart for all 12 months?
Perhaps this, If you have Date Field, Get Month field and use like this
avg(aggr(sum({<Month={">$(=AddYears(Max(Month), -1))<=$(=Max(Month))"}>} Sales),DeptName))
That didn't work. I want the chart to display the average of Sales for all departments from Jan-Dec with Month as Dimension. In a table, it works well but not in line chart.
It should work for line chart as well until unless you have some other conditions enabled.
I just have Month as Dimension and using the above expression to display in the graph for each month. When there's no month selection, I would like the graph to show sales by department by each month.
If you required by department add dimension as department and then expression should be
avg(TOTAL <Month> aggr(sum({<Month={">$(=AddYears(Max(Month), -1))<=$(=Max(Month))"}>} Sales),DeptName))