Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
suzel404
Creator
Creator

How can I obtain the Sales of first / End Month and Week ?


Hi all,

How can I have the sales of the first month and end month, the sales of first week and end week ?

Thank for your help?

1 Solution

Accepted Solutions
maxgro
MVP
MVP

month

Sum({$<Year={$(=max(Year))},Month={$(=Month(max(Date)))}>} Ventes)

week

Sum({$<Year={$(=max(Year))},Week={S$(=Week(max(Date)))}>} Ventes)

replace max of Date with min for min

View solution in original post

4 Replies
maxgro
MVP
MVP

month

Sum({$<Year={$(=max(Year))},Month={$(=Month(max(Date)))}>} Ventes)

week

Sum({$<Year={$(=max(Year))},Week={S$(=Week(max(Date)))}>} Ventes)

replace max of Date with min for min

suzel404
Creator
Creator
Author

Hi Massimo,

I use this expressions but the result is strange.  create a straight table with Month and date in dimensions. In expression, just Sum(Sales).

For  Januar 2003, I have  lines. the first of month (02/01/2003) Sales : 3390 and the end of month (22/01/2003) Sales : 3110.

With two expressions, below I have the result like 15780 that is the total Sales on the january month. I want the Sales for beginning month and ending month.

Sum ({$<Year={$(=max(Year))},Month={$(=Month(min(Date)))}>} Ventes)

Sum ({$<Year={$(=max(Year))},Month={$(=Month(max(Date)))}>} Ventes)

suzel404
Creator
Creator
Author

I use this expression : Sum({<Date={'$(=Min(Date))'}>}Ventes) . It works for Week Start/end  and Month Start/End but with my dimension Month I have only Jan and Dec. when I select 2003 year.

How can I have all month of the year 2003 ?

Jan - sales Start Month - Sales End Month

Feb - sales Start Month - Sales End Month

Mar - sales Start Month - Sales End Month

....

Dec - sales Start Month - Sales End Month

Thank for your help.

suzel404
Creator
Creator
Author

Attachment