Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dears,
I have an requirement to take the weekly sales by day. Only the current week. Currently it is adding all the production data and sum it up by day.
I need to know only the week day trend for the current week wherein the week in need to have filters for the user to select.
For e.g.
Week1, Week 2, Week 3, Week 4
Lets say the Production for the week 1 is 10,000, week 2 is 20,000, week3 is 10,000 & week 4 is 10,000. There is a field we pull from the DB as day and we try to sum it up.
As per the attachment Qlik is summing up all the premium and present it day wise. I need to filter records only based on the current week by selecting week1, week 2, week 3 & week 4.
The Expression Field is SUM(T_NETPREM)
The Dimension Field is T_WEEKDAY
I have a field as T_APPR_DT and its the actual date.
Shall we use this column to get the weekday
Ashok
Its not working. It filters the max production date and not showing the current week trend.
Ashok
Off course, Using WeekDay(T_APPR_DT) as WeekDay can convert into WeekDays. But to get recent Week you need to convert as Week(T_APPR_DT) as Week
This line i added in the data extraction Load script.
WeekDay(T_APPR_DT) as WeekDay
Do I need to use the other script Week(T_APPR_DT) as Week in the Expression column. As when I add this in the load script the field is not coming to add it.
Yes,
Load T_APPR_DT, //Assume, This is Date Field
Week(T_APPR_DT) as Week,
WeekDay(T_APPR_DT) as WeekDay,
T_NETPREM
From Source;
And then, In front end use your Dimension needed as business for show case
Expression is
Sum({<T_WEEKDAY = {$(Max(T_WEEKDAY))}>} T_NETPREM)
The script should be like this right as per your statement
Sum({<WeekDay = {$(Max(WeekDay))}>} T_NETPREM)
I think Weekday should change into Week
Sum({<Week = {$(=Max(Week))}>} T_NETPREM)
This statement sums all production. Lets say I have data from 1st November till 23rd November it is summing all the production values and present it week day wise.
My requirement is to only show the current week data alone. In this case the 3rd week.
Ashok
From here if we use Week() as Week it converts into 1,2,3. and then i am using Max(Week) that means 3 only, i believe
Why don't you try out with WeekStart date then.
In Data model Create,
WeekStart(DateField) as WeekStart
And in Expression, you can use
Sum({<WeekStart = {"$(=Max(WeekStart))"}>} T_NETPREM)