Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
arsenal1983
Creator
Creator

MAX in SET ANALYSIS

Hello Experts,

In text object I would like to count number of docs for max date included in file.

So I have the list of invoices with ISSUE_DATE and INVOICE_NO I would like to count INVOICE_NO but only for max (ISSUE_DATE).

I've try with set analysis but it's still going wrong.

regards,

L

1 Solution

Accepted Solutions
sunny_talwar

You want to see max(day) regardless of any filters?

Try this then:

Count({1<ISSUE_DATE = {"$(=Max({1}ISSUE_DATE)) "}>} Distinct INVOICE_NO)

View solution in original post

7 Replies
rubenmarin

Hi, you tried this?:

Count(DISTINCT {<ISSUE_DATE={'$(=Max(ISSUE_DATE))'}>} INVOICE_NO)

jonathandienst
Partner - Champion III
Partner - Champion III

Count({<ISSUE_DATE = {"$(=Date(Max(ISSUE_DATE))"}>} Distinct INVOICE_NO)

This assumes that ISSUE_DATE is a valid date value (not a string) in the default date format (according to the environment variables)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
arsenal1983
Creator
Creator
Author

Thanks. It seems that you missed one bracket symbol (I got Error: Error i set modifier ad hoc elemet list: ',' or ')' expected)

I tried this:

Count({<ISSUE_DATE = {"$(=Date(Max(ISSUE_DATE)) ) "}>} Distinct INVOICE_NO)


But it didn't work (it always shows 0).

It works without 'Date' part of code (I have no idea why). So the correct answer is:


Count({1<ISSUE_DATE = {"$(=Max(ISSUE_DATE)) "}>} Distinct INVOICE_NO)

arsenal1983
Creator
Creator
Author

unfortunately formula:

Count({1<ISSUE_DATE = {"$(=Max(ISSUE_DATE)) "}>} Distinct INVOICE_NO)

is wrong. IT does not work correctly - when I chose filters it shows numer of docs for max(DAY) in filter.

sunny_talwar

You want to see max(day) regardless of any filters?

Try this then:

Count({1<ISSUE_DATE = {"$(=Max({1}ISSUE_DATE)) "}>} Distinct INVOICE_NO)

arsenal1983
Creator
Creator
Author

Yes! YOU ARE MY STAR

sunny_talwar

Hahahaha, I am SUN (Sunny)

Best,

Sunny