Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am very new to Qliksense and I have a table that shows:
I'd like to be able to add in a function to the Activity Date field so that it only shows data if the Year = 2022 (which is in the load script as I have done this for other charts).
Can anyone advise how I do this?
Hey @Doran_Qlik ,
Try the below function in the Activity Date field -
=if(YEAR(Activity date=2022,Activity Date))
This still doesn't work. (I think because I have Year("Activity Date") as "Year" in my load script)
I have tried using a set analysis with the below in the Activity Date field but this isn't working either.
=count({<Year={"2022"}>}[Activity Date])
I figured out the issue. I was trying to use the function on a dimension rather than a measure.
I got this to work using:
=Concat({<Year={"2022"}>}[Activity Date])
Thanks!
Hey @Doran_Qlik , Why did you use concat in the expression?
Because I wanted the pivot table to show the full date value in each row rather than a sum or count and concat seemed to work 😊
Create Calendar in your data model that is associated to ActivityDate
Refer the script in below article,
Simply replace "ORderDate' with ActivityDate to associate the calendar with your dataset
https://qlikviewcookbook.com/2015/05/better-calendar-scripts/