Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I’m new Qlik and I have an issue that I’m having difficulty trying to resolve. I want to create a dashboard that contains a line chart that restricts activity to the last 12 months (the dataset has over 60mths of data). I have got this working via set expression.
As below:
sum({$<[Period]={">=$(=AddMonths(Max([Period]),-12)) <=$(=MonthEnd(Max([Period])))"}>}[Period Actual])
The problem I have is that the same field [Period] also needs to be a filter on the dashboard – to enable a user to hone in on a given visualisation. Currently when this filter is used the 12 month trend graph is not persisted and displays a single point. Which is not the behaviour I’m after. I have tried using 1 instead of the $ and that doesn’t give me the result I’m looking for as – the other filters on the dashboard need to affect the line chart.
Any help welcome!
Thanks!
Then you need to rephrase or explain your issue in more details. Maybe you can share a screenshot of your output and try to explain what your desired output is.
Could it be that you are making selections i other master calendar fields than just [Period], e.g. [Year] or [Month]?
If so then you need to cancel these selections in your expression.
sum({$< [Year]=, [Month]=, [Period]={">=$(=AddMonths(Max([Period]),-12)) <=$(=MonthEnd(Max([Period])))"}>}[Period Actual])
thanks for replying. I only have Period as a calendar item.
Then you need to rephrase or explain your issue in more details. Maybe you can share a screenshot of your output and try to explain what your desired output is.
Sure – hopefully the below will clarify
I need the bar chart displayed always to show the last 12 months. I need the filters excluding the Month to reflect what the user has selected. This works ok using the set analysis previously described.
The problem occurs when the month filter is used, when this is used – the bar chart is also affected.
The bar chart and month filter are based on the same Period dimension.