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

Max of date help

Hi Experts,

Can any  one please help me on below requirement.

In the below its showing two dates(19.08.2018 and 18.08.2018) sum of amount.

Could you please help me to show the Max([Reporting Date]) i.e., 19.08.2018 amount by default then after selecting 18.08.2018 it has to show selected date amount.

The measure used here is below one. I have to apply [Reporting Date]=$(=Max( [Reporting Date]))

=Sum(Amount)

*

Sum(Aggr(RangeMax(0,Sum(Value)) + RangeMax(Sum(Item1),Sum(Item2),Sum(Item3),Sum(Item4),Sum(Item5),Sum(Item6),Sum(Item7),Sum(Item8),Sum(Item9),Sum(Item10),Sum(Item11))/5+0.1, Date, Name, SCOPE))/
Sum(TOTAL <Name> {<SCOPE>} Aggr(RangeMax(0,Sum({<SCOPE>}Value)) + RangeMax(Sum({<SCOPE>}Item1),Sum({<SCOPE>}Item2),Sum({<SCOPE>}Item3),Sum({<SCOPE>}Item4),Sum({<SCOPE>}Item5),Sum({<SCOPE>}Item6),Sum({<SCOPE>}Item7),Sum({<SCOPE>}Item8),Sum({<SCOPE>}Item9),Sum({<SCOPE>}Item10),Sum({<SCOPE>}Item11))/5+0.1, Date, Name, SCOPE))

max of date.png

Please help me on this. Please find the attached app.

Thanks in advance.

5 Replies
marinadorcassio1
Partner - Creator
Partner - Creator

Hi Mahitha,

Experts will have difficulties to help you like this I think. Since you are aggregating in your measure, you have to know excatly what result you should obtain, and then think.

The idea is to add a set analysis like {<[Reporting Date]={'$(=Max( [Reporting Date]))'}>}, but only you can know where, depending on what result you want.

Regards,

Marina

ValeriyaBartosh
Partner - Contributor III
Partner - Contributor III

Hello,

mb i don not understand you correct and you requirements...

Mb you need something like this:

if (getselectedcount ( ReportingDate)>0, Sum(Amount), Sum( {<[Reporting Date]={'$(=Max( [Reporting Date]))'}>}Amount))

praveenkumar_ma
Partner - Creator
Partner - Creator

Try like this

IF((ISNULL(GetFieldSelections(ReportingDate))),

Sum(IF(ReportingDate=(ApplicationDate),Amount))

,Sum({< ReportingDate = {'$(=Max(ReportingDate))'} >} Amount ))

May be Helpful....

Regards

PM

mahitham
Creator II
Creator II
Author

Hi Praveen,

Without selecting any date I have to apply Max of date in the below expression.

Sum(Aggr(RangeMax(0,Sum(Value)) + RangeMax(Sum(Item1),Sum(Item2),

Sum(Item3),Sum(Item4),Sum(Item5),Sum(Item6),Sum(Item7),Sum(Item8),Sum(Item9),Sum(Item10),Sum(Item11))/5+0.1,

[Reporting Date],Date, Name, SCOPE))

/

Sum(TOTAL <Name, [Reporting Date]> {<SCOPE>} Aggr(RangeMax(0,Sum({<SCOPE>}Value)) +

RangeMax(Sum({<SCOPE>}Item1),Sum({<SCOPE>}Item2),Sum({<SCOPE>}Item3),Sum({<SCOPE>}Item4),

Sum({<SCOPE>}Item5),Sum({<SCOPE>}Item6),Sum({<SCOPE>}Item7),Sum({<SCOPE>}Item8),Sum({<SCOPE>}Item9),

Sum({<SCOPE>}Item10),Sum({<SCOPE>}Item11))/5+0.1, Date, Name, SCOPE, [Reporting Date]))

Anonymous
Not applicable

if you do Max(Date) it will return your last date. and it will also return the last date filtered if you select two. and the actual date selected if it is only one.

when doing this:

[Reporting Date]=$(=Max( [Reporting Date]))

you can make it work like this:

[Reporting Date]="Max( [Reporting Date])"     // if it is a filter

[Reporting Date]=Max( [Reporting Date])        // in a if statement

double quotes calculate the content, single quotes uses it as string.

I think with this you can work your function out.

Like, mark as helpful or as the answer. It helps a lot!

Thanks