Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
Contributor III

Max Value on the basis of multiple fields in Aggr

Dear All,

Facing issue in finding the Latest/max Rate on the basis of  Part_no and Link_Date but dere are two scenario that I have to check.

1. Pick Rate on the basis of Max Link_Date of any part_no.

2. If Link-Date is same for any Part_no den pick the max Rate

Input:

 Link_Date Link_Partno Rate 28/06/2017 D10002770.9 169.55 28/06/2017 D10002770.9 241 28/06/2017 D10002770.9 248 20/07/2017 D10009970.9 15 21/07/2017 D10009970.9 12

Output

Issue is : not showing the data if multiple Rate is there against single Link_date  of any part no .

Regards

Swati

1 Solution

Accepted Solutions
MVP

Dimensions

Expression

9 Replies
MVP

Why not just this

MVP

In fact if you have Link_Partno as your dimension, you should be able to use just Max(Rate)

MVP

Check this out

Dimension

Expression

Max(Rate)

Data:

Rate

FROM Table;

left join(Data)

max(Rate) as Rate,

1 as MaxRateFlag

resident Data

group by

Part_no ,

Now write expression

= only({<MaxRateFlag={1}>}Rate)

Contributor III
Author

Hey Hi,

I want the below result:

I have to check Rate on two different basis

first Pick Rate on the basis of Max( Link_Date) for part_no. and if Link-Date is same for any Part_no den pick the max Rate of that link_date

Output

MVP

Dimensions

Expression

Contributor III
Author

Hey,

Thanks for the correct solution but now I don't want link_date in chart , it should show part and Rate only.

If I will not take link date in the chart then 0 is coming.

Is there any way?

Contributor III
Author

Hey,

By applying the above logic getting this result

But I want below output

 Link_Partno Rate D10002770.9 248 D10009970.9 12

Contributor III
Author