Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This should be simple. But I can't figure it out in Qlik Sense.
I have created an Inline table with 2 values for the Year (2015,2016).
I want to put Set Analysis on my charts to only show data where the Year of the field I am using is equal to the choice made from this listbox. YearValue is the Inline table value from above (2015, etc.) that I created.
So far everything that I have tried is not working.
This is one example of something that I have tried:
Count({< Year(CreatedDateTime) = {$(YearValue)} >} IncidentNumber)
Any help would be greatly appreciated
I would suggest creating Year field in the script and then use that in your set analysis:
LOAD CreatedDateTime,
Year(CreatedDateTime) as YearField
FROM Source;
Count({<YearField = {$(YearValue)} >} IncidentNumber)
or
Count({<YearField = p(Year)} >} IncidentNumber)
Here Year is your Year field from Inline Table.
I would suggest creating Year field in the script and then use that in your set analysis:
LOAD CreatedDateTime,
Year(CreatedDateTime) as YearField
FROM Source;
Count({<YearField = {$(YearValue)} >} IncidentNumber)
or
Count({<YearField = p(Year)} >} IncidentNumber)
Here Year is your Year field from Inline Table.
Your expression does something. But no data is being displayed in the chart. I have verified the value in my inline table and also the new field created in the script. The values are both 2015.
But nothing shows in the chart.
Have you created a year field in the script?
I created it and called it YearCreated
Would you be able to share a sample to take a look at?
I got it.
This works:
=Count({$<YearCreated={$(=YearValue)}>}IncidentNumber)
Thank you for your help