Hey!
I have created two buttons (YTD & MTD) using the variable extension to toggle between the YTD and MTD sales on shown on the map. The expression I have used is as follows:
=if($(=vYearSales)= 1,
Sum({<Flag={'Sales'},[Dashboard Cust Type]={'AM'},Year=,Month=,Day=,Num_Date={">=$(=num(yearstart(max(Num_Date))))<=$(=max(Num_Date))"}>}Sales),
Sum({<Flag={'Sales'},[Dashboard Cust Type]={'AM'},Year=,Month=,Day=,Num_Date={">=$(=num(monthstart(max(Num_Date))))<=$(=max(Num_Date))"}>}Sales))
The Value given to the YTD button is '1' . The expression works fine when I use it on a table but does not work on the map.
Please let me know if there is a solution to this.
note: the map is inside a container which has three different maps for "Sales", "Budget" and "Ratio" and the same variable is used on all three maps.
Thanks & Regards