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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If condition issue

Hi,

I am new to qlikview, I want to get the max date of the below group. please help

if (AR_GRP2={'OT','AD','GG','OC','GM'},

DATE(max(TICKET_DATE),'DD-MMM-YYYY')

if i am giving DATE(max(TICKET_DATE),'DD-MMM-YYYY') then its working fine but when I am adding condition AR_grp2, then its not working.

Regards,

Adeel

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You are using this in an expression, right? And your dimension is not AR_GRP2, is it?

Always use aggregation functions in expressions:

Use Aggregation Functions!

=DATE(max(if (Match(AR_GRP2,'OT','AD','GG','OC','GM'),TICKET_DATE)),'DD-MMM-YYYY')

or using set analysis:

Date( Max({< AR_GRP2={'OT','AD','GG','OC','GM'} >} TICKET_DATE),'DD-MMM-YYYY')

View solution in original post

4 Replies
swuehl
Champion III
Champion III

You are using this in an expression, right? And your dimension is not AR_GRP2, is it?

Always use aggregation functions in expressions:

Use Aggregation Functions!

=DATE(max(if (Match(AR_GRP2,'OT','AD','GG','OC','GM'),TICKET_DATE)),'DD-MMM-YYYY')

or using set analysis:

Date( Max({< AR_GRP2={'OT','AD','GG','OC','GM'} >} TICKET_DATE),'DD-MMM-YYYY')

HirisH_V7
Master
Master

Hi,

You can use expressions like this,

if(AR_GRP2='OT','AD','GG','OC','GM',Max(Date))

By using Set Analysis,

Max({<AR_GRP2={'OT','AD','GG','OC','GM'}>}TICKET_DATE)

HTH,

Hirish

HirisH
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this using set analysis

DATE(max({< AR_GRP2={'OT','AD','GG','OC','GM'} >}  TICKET_DATE),'DD-MMM-YYYY')


Regards,

jagan.

Not applicable
Author

Below  expression is working fine.

Date( Max({< AR_GRP2={'OT','AD','GG','OC','GM'} >} TICKET_DATE),'DD-MMM-YYYY')


Thank you all.