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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

getting data for max(columnname)in set analysis

hi All,

I have column as As of Date.I need to show data for max(As of Date) and for

max(As of Date)-182  for 2 different expressions.

but in set analysis i am unable to get data for these two diffent dates what in two different  expressions.

Can you please suggest what would be syntax for this in set analysis.

thanks

1 Solution

Accepted Solutions
sunny_talwar

This is what you want?

Capture.PNG

Attaching the qvw for your reference.

Set analysis you need is this: DATE={"$(=date(MAX(DATE)-182,'M/D/YYYY'))"}

HTH

Best,

Sunny

View solution in original post

5 Replies
sunny_talwar

What is the format of As of Date field?

For max As of Date: {<[As of Date] = {"$(=Date(Max([As of Date]), 'YourDateFormt')"}>}

For 6 months ago As of Date: {<[As of Date] = {"$(=Date(AddMonths(Max([As of Date]), -6), 'YourDateFormt')"}>}

HTH

Best,

Sunny

deepakqlikview_123
Specialist
Specialist
Author

Hi Sunny,

Can you please suggest how tao get date 182 days before from max(As of Date)

Thanks

sunny_talwar

Updated:

If you want to go exactly 182 back, you can use this:

Date(Max([As of Date]) - 182)

If going 6 months back will suffice you can use this:

Date(AddMonths(Max([As of Date]), -6))

deepakqlikview_123
Specialist
Specialist
Author

Hi,

PFA.

still i am not able to get data for max(DATE)

max(DATE)-182

and for max(DATE)-365


I have used 3 expressions for this.


Thanks


sunny_talwar

This is what you want?

Capture.PNG

Attaching the qvw for your reference.

Set analysis you need is this: DATE={"$(=date(MAX(DATE)-182,'M/D/YYYY'))"}

HTH

Best,

Sunny