# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today. 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 MVP & Luminary

## Re: Max(Date) in a table

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

2 Replies
Esteemed Contributor II

## Re: Max(Date) in a table

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

## Re: Max(Date) in a table

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

Community Browser