Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Have a gauge chart on my dashboard that does the following calculation:
sum({<[Ledger Type]={'BA'}
,Source={'F0902'}
,[JDE.Year] = {$(=$(vV_CurrentYear))}
>}Amount/100)
vV_CurrentYear = Year(Today()) so the chart is currently defaults to the current year.
However, we'd also like to enable the users to select other year from the 'Year' filter pane. Please note, they can only select one single year from the filter but not multiple years.
Please let me know how to achieve this via set analysis.
Thanks in Advance.
Yes, it's a bit if a trick that it works. What you really want is the max JDE.Year but no later than today. When nothing or more than 1 JDE.Year is selected, [JDE.Year] is returning null because there is only one value. So it uses today().
It will however break if more than one JDE.Year is selected. It actually should have a max() in there:
,[JDE.Year] = {$(=RangeMin(max([JDE.Year]),Year(today())))}
-Rob
You are absolutely right.
By adding 'max' to the expression, it is now only return the most recent year data even if I select multiple years.
Learning something new. Thank You!