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

Find a dimension value which corresponds to MAX or MIN of an expression

Hi,

i need to find the GJ_Woche who have the MAX and MIN value and put them in a textbox.

Regards

Stefan

7 Replies
tresesco
MVP
MVP

For Max= FirstSortedValue(GJ_Woche, - Aggr(Sum(Erloes),GJ_Woche))

For Min=FirstSortedValue(GJ_Woche, Aggr(Sum(Erloes),GJ_Woche))

Anonymous
Not applicable
Author

Thanks for you reply. If i filtered Listbox BU0 there is wrong value. Pls look at my jpg.

tresesco
MVP
MVP

Is it that, you want the output remain same even after selection? If so then try using set like:

For Max= FirstSortedValue(GJ_Woche, - Aggr(Sum( {1}Erloes),GJ_Woche))

For Min=FirstSortedValue(GJ_Woche, Aggr(Sum({1} Erloes),GJ_Woche))

MK_QSL
MVP
MVP

Fix your SUM(Erloes) by SUM({1}Erloes)

Anonymous
Not applicable
Author

Yes i want it, but i need also min/max value from field (Sum(Erloes)

MK_QSL
MVP
MVP

='Min in ' & FirstSortedValue(GJ_Woche, Aggr(sum({1}Erloes),GJ_Woche)) & ' '  &  Min({1} RangeMax(Erloes))

Rest you can do yourself

Anonymous
Not applicable
Author

Sorry, i get not the right value. With selected BU i have min of all rows. Can you pls look again?
Many, many thanks.