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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis: Show minimum week value for each month

Hi Qlik Developers,

I'm facing an issue coming up with a Set Analysis expression to show inventory value for every month in a year (it should show minimum week for every month). When I use the below expression, it shows only value for January (1st week) but other months remain NULL or blank.   

=if((Only([Month Number])), Sum({$<[Year]={$(=max(Total [Year]))},[Week Number]={$(=min(Total [Week Number]))}>} Inv_Units), Sum({$<[Year]={$(=max(Total [Year]))}>}  Inv_Units))

Just an example:

The above expression showing only 1st week value for January and blank for others.

January   50

February   -

March       -

April          -

and so on....

Where as I want to see values for each month (min 1st week for every month not only January)

January   50

February  45

March      38

April         12

and so on....

I thought of the below expression to achieve the desired results but this was also showing only January.

=if((Only([Month Number])), Sum({$<[Year]={$(=max(Total [Year]))},[Month Number]={$(=(Total [Month Number]))},[Week Number]={$(=min(Total [Week Number]))}>} Inv_Units), Sum({$<[Year]={$(=max(Total [Year]))}>}  Inv_Units))

I would really appreciate your help!!

Thanks!

Vidit

2 Replies
sunny_talwar

Would you be able to share a sample to look at?

Not applicable
Author

Hi Sunny,

I can't share much but here is a screen shot. If you see all other months are 0 but only feb shows value. We follow retail calendar so our first month is Feb (Just to clear out confusion).

Thanks!

Vidit

QlikSetAnalysis.jpg