Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

Hi,

I have three columns as below

Month (201502, 201503, 201504)

category(2,3,4,5....)

sales total (143432,41234,234123,23412,.....)

I want to get the sum of sales for max(month) for category 3

but i am not able to write the exact syntax to select the max of month and filter category 3 to get the total sum.

please help me with the syntax for set analysis.

7 Replies
sunny_talwar

Try this:

Sum({<category = {3}, Month = {'$(=Max(Month))'}>}[sales total])

reddy-s
Master II
Master II

Hi Prasantha,

Sunny's reply should solve the issue if not try this:

Sum({<category = {3}, Month = {'=$(=Max(Month))'}>}[sales total]) //an = sign before the dollar

Not applicable
Author

putting that Max inside is not working.Capture.JPG

Not applicable
Author

hi,

But in my case as per below screen shot, putting Max inside is not workingCapture.JPG

sunny_talwar

What is not working? Are you seeing error? seeing 0? What exactly is the issue you are running into?

paul_scotchford
Specialist
Specialist

You have an extra bracket too many after the max() statement

sunny_talwar

Look at Paul's comment below: Re: Set analysis