Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max(Date) in a table

Hello,

In a table, I try to count point  if point =1  and I divide it with the sum of point,  so I use this :

Count({$ <Points={'1'} >} Points)/Count(TOTAL_LINE)

And it works but now I want to have it only for the last month. I used a set analysis :

Count({$ <Points={'1'},[Month] = {'$(=Max([Month]))'}>} Points) / Count({<[Month] = {'$(=Max([Month]))'}>}TOTAL_LINE)

But it returns me only zéro value so i tried with with an "if" but it give me the same result.

Have you got an idea?

1 Solution

Accepted Solutions
marcus_sommer

Try it with:

Count({<[MonthNUM] = {"$(=Max([Month]))"}>}TOTAL_LINE)

because max. Month will return an integer like 1,2,3 ... and this won't match if your Month field contain 'Jan', 'Feb', ... and the easiest way to handle it is to add a pure numeric Month field within the datamodel (within a master-calendar).

- Marcus

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

Count({$ <Points={'1'},[Month] = {"$(=Max(TOTAL [Month]))"}>} Points) / Count({<[Month] = {"$(=Max(TOTAL [Month]))"}>}TOTAL_LINE)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
marcus_sommer

Try it with:

Count({<[MonthNUM] = {"$(=Max([Month]))"}>}TOTAL_LINE)

because max. Month will return an integer like 1,2,3 ... and this won't match if your Month field contain 'Jan', 'Feb', ... and the easiest way to handle it is to add a pure numeric Month field within the datamodel (within a master-calendar).

- Marcus