Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All
I need to create two date Parameters ie From and To date using the functions. which will give me the Sales for the chosen years. The free trial of the App version is ceased and hence and i can only access the same in cloud.Request to please give me a step by step creation of the same. (using functions) no scripts please.
Also i need to calculate the Sales Growth for the Date parameters created.
Regards
Sneha Simha
Hi, you can add two variable objects for the user to inser fron and to dates, or use a celndar object with ranged selections.
The expressions that uses variables could be: Sum({<DateField={">=$(FromVariable)<=$(ToVariable)"}>} Sales)
And with calendar you can use a simple: Sum(Sales)
About the growth... calculated based on what values? it would be better if you post sample data and the expected result.
Hi
I cant possibly share the data, i want two date parameters say one for last year and one for this year.The Growth should be calculated based on the Sales for both the years.
Without the code , is there a way to get the calendar generated like in Tableau
Regards
Sneha Simha
Hi, I don't know Tableau, If you load ata using data manager a calendar is created automatically from the dates fields, one of this fields is the year.
Having Year as field to make selections, the expression could be:
(Sum({<Year={"$(=Max(Year))>} Sales)-(Sum({<Year={"$(=Min(Year))>} Sales))/Sum({<Year={"$(=Min(Year))>} Sales)
Hi, there are different ways to load data, ther is a data manager, where you can select a column data, mark it as date field, and the calendar is created autoamticaly. Maybe you are no using this option because usually date fields are automaticaly marked.
The othre option is script editor, this is more flexible but you need to work with the script, in this case to create a year field from data you only need to a row:
LOAD <List of fields>,
Year(DateField) as Year // this is the new row to add
FROM ...
If doesn't works I will need more info, post your script, or some dummy data, or something... there are a lot of different ways to do the same, you need to provide more info about your current attemps to make this work..
Hi Rubenmarin
Regards
Sneha simha
You are may looking for the date picker.
You can find it under custom objects> Qlik Dashboard bundle:
Hi, attached there is a sample to do this for sales, I'm using two date pickers as @chris_djih suggest.
Period 1 to default state and period 2 assigned to 'Comp' altern states.
You can create altern states in master items, this allows to use the same field with differnt slections
To use selctions of the Comp alternstaet you can use set analysis, so the epxression would be:
- Period 1: Sum(SalesValue)
- Period 2(using altern state): Sum({Comp} SalesValue)
To calculate the group i'm using Column() function, you can also use column labels, master items or write the full expression: (Sum({Comp} SalesValue)-Sum(SalesValue))/Sum(SalesValue)