9 Replies Latest reply: Apr 3, 2013 11:44 AM by Rupas Lopes

# Set Analysis problem

Hi!

I'm sorry for the text (I was helped by Google Translate)

I need to get a score count for the end date of the period grows exactly

I'm using:

= count ({\$ <ScoreDate={"=Date(Max(ScoreDate))"}>} Score)

But I get is the same thing as when you use

= Count (Score)

How to do it?

PFA

• ###### Re: Set Analysis problem

But this will not work as I need. Maybe you misunderstood me ...

Let me explain more precisely.

I need a column to "Count (Score) on the last date" filled count score of the day "MaxDate".

By month should be the result:

ScoreMonth         Count (Score) on the last date

Jan                                   2

Feb                                  3

Mar                                  1

How to achieve such a result?

• ###### Re: Set Analysis problem

Hi

create one variable for max date

like varmax

=Max(ScoreDate)

use this expression

sum({<ScoreDate={'\$(varmax)'}>}score)

• ###### Re: Set Analysis problem

This is not quite what I need. See my answer Sivaraj Seeman.

• ###### Re: Set Analysis problem

Hi,

In script you flag for the last day of the month by using MonthEnd(), then by using this flag you can easily arrive this

DateField,

If(DateField = MonthEnd(DateField), 1, 0) AS MonthEndFlag

FROM DataSource;

=Count ({<MonthEndFlag={1}>}Score)

Hope this helps you.

Regards,

Jagan.

• ###### Re: Set Analysis problem

Thank you for your response. It really works.

The only problem is to make it a universal solution will need to make a separate flag for each of the possible periods (year, quarter, month, week, day).

Until I decide the problem with your method. If I find a universal solution that will write in this topic.

Thank you!

• ###### Re: Set Analysis problem

Check the attached file