6 Replies Latest reply: Jan 9, 2015 10:58 AM by lukas könig RSS

    Variable as field name in set analysis

      Dear all,


      I have the following Issue:


      I created a variable "vYear" and this variable contains a flag from the master calendar. (e.g. vYear = "CY" (which represents the current Year)).

      I used to have the following Expression which worked fine for me and calculates the total sales of the current year:


      Sum({1<CY = {1} >} Sales.Amount)



      Now I want to replace the "CY" with the Variable "vYear". As far as I know only field names are allowed on the left Hand side of the modifier. I tried the following:

      Sum({1<$(vYear) = {1} >} Sales.Amount)


      Unfortunately, QV does not recognoze my variable as the CY field flag from the master calendar.


      Is it anyway possible to use variables on the left Hand side of the modifier, if the result of the variable is a field Name?


      Please help me with this, I hope this will work!


      Thanks in advance!