Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
pashok75
Contributor II
Contributor II

Weekday wise Production in Expression

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

26 Replies
pashok75
Contributor II
Contributor II
Author

  Week(T_APPR_DT) as Week,


when I add this  in load script it is throwing an error while executing the script.

Anil_Babu_Samineni

How is format looks like for T_APPR_DT ?? Because, Week is default function for Qlik.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shraddha_g
Partner - Master III
Partner - Master III

What is the error you are getting?

Please attach a screenshot of error.

pashok75
Contributor II
Contributor II
Author

week(Date#(T_APPR_DT,'DD-MM-YYYY')) AS WEEKS

T_APPR_DT is the date field

Anil_Babu_Samineni

What are you getting, when u use this? Can you show image as WEEKS in list box?

week(Date(Date#(T_APPR_DT,'DD-MM-YYYY'))) AS WEEKS

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
pashok75
Contributor II
Contributor II
Author

Dear Anil,

The script seems to work fine. I had created as a column and make a searchable field inside the chart.

However I am seeing the data is coming for the script

week(Date(Date#(T_APPR_DT,'DD-MM-YYYY'))) AS WEEKS

44 - week1,

45 - week 2,

46 week 3,

47 week 4


week.png

Anil_Babu_Samineni

Great, Please close this thread by flag "Correct Answer"

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful