Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a sales by year trend line chart in QLik sense. I also have year,age,gender,segments etc. as filters.
Now, I would not want my trend line to be affected by the year filter but by all the other filters.
How should I write the sales set expression for the same.
Any help would be appreciated.
Thanks,
Sowmya
As Sunny mentioned, a set analysis expression will solve your issue
You can also use this:
sum(<{ Year = }>Sales)
Add it like this to your expression:
{1<Year = $::Year>}
Alternatively, you can also try this:
{<Age, Gender, Segments, ...>}
As Sunny mentioned, a set analysis expression will solve your issue
You can also use this:
sum(<{ Year = }>Sales)
sangram, I might be wrong, but it seems the OP wants the chart to change based on year and not others.
Hi Sunny,
Thats fine! But the query above says , the person does not want the Year filter to work.
You are right, I missed 'not' . My bad
Hi ,
Thanks Sangram and Sunny!
I think you meant sum( {< Year = >} Sales) and not sum(<{ Year = }>Sales).
And it definitely works for every other field i add apart from year. for e.g: sum( {< Age = >} Sales) or something similar is working by restricting filter on Age.
What I would like to clarify is my year field comes from a date field by using the Qlik auto generated year field.(screenshot below).
When I add the date field directly to filter pane and use sum( {< Snapshot Date = >} Sales) it works!!
But sum( {< [Snapshot Date.autoCalendar.Year] = >} Sales) does not.
Any suggestions?
Update to above:
I tried deriving the year field from date field in script and used the new field instead of the auto generated field and it works.
My understanding is that this that happens with auto calendar generated date fields!! not sure why though.
Thank you once again!
HI Sowmya,
Is it possible to share the app?