Skip to main content
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
shraddha_g
Partner - Master III
Partner - Master III

Share some sample data and expected output

Anil_Babu_Samineni

In fact, Qlik has power with automate associate engine. So, I would think much efficient to show title indication

Sum({<T_WEEKDAY = {$(=Max(T_WEEKDAY))}>} T_NETPREM)

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

When I execute the command it shows NO DATA TO DISPLAY.

The column name is T_Weekday I changed it but still data is showing NO DATA TO DISPLAY

Sum({<T_Weekday = {$(=Max(T_Weekday))}>} T_NETPREM)

shraddha_g
Partner - Master III
Partner - Master III

Try this:

Sum({<T_Weekday = {"$(=Max(T_Weekday))"}>} T_NETPREM)

Else Share the format of data available in T_Weekday Column

pashok75
Contributor II
Contributor II
Author

Still no data to display

T_Weekday data in the Table

Sun

Mon

Tue

Sat

Wed

shraddha_g
Partner - Master III
Partner - Master III

How are you defining week1 , Week2 etc.?

pashok75
Contributor II
Contributor II
Author

Actually I had not defined week1, 2.

This also needs to be done in case the user wants to compare the weeks to see the growth of the production.

Ashok

shraddha_g
Partner - Master III
Partner - Master III

Try

Sum({<T_Weekday = {"$(=Maxstring(T_Weekday))"}>} T_NETPREM)

Anil_Babu_Samineni

Try to change, Your week field in script like

Week(DateField) as Week

And then use my expression.

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