Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a function with parameter and I want user to select parameter in front to have visibility in dashboard accordingly based on passed parameter.
Function I called in Qlik Script
SELECT *
FROM [dbo].[Get_ Data](2021)
By using this function I am getting a table in Qlik front end but when I have to see the data of 2020 I had to go back to load editor and pass the parameter in function like
SELECT *
FROM [dbo].[Get_ Data](2020)
I just want my user can pass the year based on their requirement in front end and visualize the data because they can't go to load script.
Please advise.
Thanks
If my understanding is correct, you have a dataset with data for various years and you want to retrieve data for specific year based on user's selection. In this case I would recommend the combination of variables and set analysis, but you have to load all the data for all the years. This will also ensure that your reload script is not executed all the time to retrieve different parts of the dataset. Those are the steps that I have followed:
Then whenever you create a Chart, you will have to use a set analysis that will take into consideration the variable that we have created. For example an KPI's expression will look something like this: =Count({$<[OrderDate.autoCalendar.Year]={$(vYearSelection)}>} FIELD) where:
Here is how my example looks like:
My Data:
KPI for selected date 2018:
As you can see from the dataset the Order count was 2,373 for 2018 so the KPI shows 2.37K
KPI for selected date 2020:
As you can see from the dataset the Order count was 238 for 2020 so the KPI shows 238
I hope that this information was helpful
If my understanding is correct, you have a dataset with data for various years and you want to retrieve data for specific year based on user's selection. In this case I would recommend the combination of variables and set analysis, but you have to load all the data for all the years. This will also ensure that your reload script is not executed all the time to retrieve different parts of the dataset. Those are the steps that I have followed:
Then whenever you create a Chart, you will have to use a set analysis that will take into consideration the variable that we have created. For example an KPI's expression will look something like this: =Count({$<[OrderDate.autoCalendar.Year]={$(vYearSelection)}>} FIELD) where:
Here is how my example looks like:
My Data:
KPI for selected date 2018:
As you can see from the dataset the Order count was 2,373 for 2018 so the KPI shows 2.37K
KPI for selected date 2020:
As you can see from the dataset the Order count was 238 for 2020 so the KPI shows 238
I hope that this information was helpful