Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I'm working on this Concat-formula and get again no result.
LOAD * INLINE [
Years
...,
2007,
2008,
2009,
2010
]
=max( concat( {$} distinct Years, ',') )
The result should be 2010.
you know what it is
just use: =max(Year). Than you get the same result
Concat creates a comma separated list, which the Max function can't handle. Try:
Rangemax(Concat({1} distinct Years, ','))
Also, why can't you use:
Max(Years)
Why do you want to use concat and max ad the same time?
just use: =max(Year). Than you get the same result
Hi,
thanks for the Answer,
I want to compare selected years.
The formula in the chart is:
=Sum(
{$<Years={
$(=(max(concat({$} distinct Years,','))))
}
} sales
...
Did you try Rangemax()? The Range functions take a comma separated list and pick out the biggest value (or smallest, etc depending on which one you're using). If you can't simply use Max(Years), then Rangemax(Concat({1} distinct Years, ',')) will do what you're trying to do.
Hi
I think you can get what you are trying with
=Sum({$<Years={ $(=(max(Years)))}>} sales)
This will sum the sales amounts for records where the year is the latest in the file (2010 in your example)\
Hope that helps
Jonathan
Edit: Formula type corrected
Not sure what you mean by that. Is it a question or an answer?
Jonathan
ignore the last post
your formula
=Sum({$<Years={ $(=(max(Years)))}>} sales)
is correct.
But if I want to compare the years 2001,2003,2009, I need the Concat function
Here is the solution:
Max({$<Years={$(=(concat({$} DISTINCT Years,',')))}>}DISTINCT Years)
The Complete solution I'll post when everything is ready