Forum Discussion

airwolf39's avatar
airwolf39
Helper V
4 years ago

Why does this variable not work?

Why is the variable 'calc' greyed out at the bottom?

3 Replies

  • ALLUREAN's avatar
    ALLUREAN
    Solution Sage

    Hi, airwolf39 

    Try to put var calc = ..... just below measure name, and first SWITCH after return

     

    Measure = 
    var X = [....]

    var Y = [,,,,,]

    RETURN

    SWITCH....

    • airwolf39's avatar
      airwolf39
      Helper V

      The total is now wrong because the variable is outside of the isinscope function 

      • ALLUREAN's avatar
        ALLUREAN
        Solution Sage

        Text like VAR xyz = [...] cannot be inside, they should stay isolated and used the name xyz in expressions.