Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i have the following data:
table:
LOAD * INLINE
[
id, name, year
1, a, 2015
2, a, 2016
3, a, 2017
4, a, 2018
5, b, 2016
6, b, 2017
7, b, 2018
8, c, 2017
9, c, 2018
]
When the User filters by year:
what i need is the minimal value in the User selection interval:
a 2015
b 2016
c 2017
I can't use {1} because it ignores the user selection. I tried $<year={$(=(MIN(year))}> but i got nulls for b and c
Thank you.
After some testing i found it:
Min({<year={">=$(=MIN(year))"}>*<year={"<=$(=MAX(year))"}>}year)
It should be the intersection operator or else global minimums are shown.
Thank you for your attention.
Thiago,
You could try somenthing like this:
Min(Aggr(Year),name))
Or
FirstSortedvalue(Year,Aggr(Year,name))
I tried your suggestions and
FirstSortedvalue(year,Aggr(MIN(year),name))
but got the same result.
After some testing i found it:
Min({<year={">=$(=MIN(year))"}>*<year={"<=$(=MAX(year))"}>}year)
It should be the intersection operator or else global minimums are shown.
Thank you for your attention.
Great man!