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

SET ANALYSIS = Using MAX(DATE) and disregard YEAR, MONTH and DAY Selection

Hi folks,

I have the following scenario:

I'm trying to sum a VALUE considering only the values accumulated in the MAX DATE of my fact table. It's currently working through the expression bellow:

SUM( {$< TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max(DATE))'} >} VALUE )

However, the expression is currently considering the YEAR, MONTH and DAY selected in order to set the MAX(DATE), but I don't want it to consider those filters.

What can I do in this case?

Cheers,

Rubens Rodrigues

1 Solution

Accepted Solutions
thiago_mlg
Creator II
Creator II

Rubens,

The correct is:

SUM( {1< TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max({1} DATE))'} >} VALUE )


If dont have the first one, no works.


See ya..


Thiago Gonçalo

View solution in original post

7 Replies
MK_QSL
MVP
MVP

SUM( {$<YEAR=, MONTH=, DAY=,  TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max(DATE))'} >} VALUE )

Anonymous
Not applicable
Author

Hi Manish,

I've tried this script, but when I select Year, Month or Day, the number still changes. I also tried:

SUM( {1<YEAR=, MONTH=, DAY=,  TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max(DATE))'} >} VALUE )

Thanks,

Rubens

Anonymous
Not applicable
Author

Hi Rubens,

Try this expression:

SUM( {$<YEAR=, MONTH=, DAY=,  TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max(DATE))'} >} VALUE )

MK_QSL
MVP
MVP

It should not change..
Make sure that all Fields are Case Sensitive...

YEAR, MONTH and DAY is different from Year, Month and Day..

If still not working, provide sample app.

antoniotiman
Master III
Master III

Try

SUM( {$< TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max({1} DATE))'} >} VALUE )

thiago_mlg
Creator II
Creator II

Rubens,

The correct is:

SUM( {1< TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max({1} DATE))'} >} VALUE )


If dont have the first one, no works.


See ya..


Thiago Gonçalo

Anonymous
Not applicable
Author

Thank you Thiago/Antonio,

It was really missing the "1" after "SUM {...".

SUM( {1< TYPE_FACT = {'Remove CAP'},  DATE = {'$(=Max({1} DATE))'} >} VALUE )

It's working properly now.

Thank you guys!

Rubens