
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Default to current year but enable user to select from year dropdown list as well
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.
- « Previous Replies
- Next Replies »


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!

- « Previous Replies
- Next Replies »