6 Replies Latest reply: Mar 19, 2018 12:31 PM by Colin O'Donnell RSS

    Using variable names in field

      Hi there,


      I need some help with a problem that I would like to explain by the following example:


      I've created several variables with each of them containing a set Expression:


      vSales = SUM({<Type={1}>} PriceSale)

      vCostOfSales = SUM({<Satzart={1}>} PricePurchase)

      vWastage = SUM({<Satzart={2}>} PricePurchase)

      vGrossProfit = SUM({<Type={1}>} PriceSale) - SUM({<Satzart={1, 2}>} PricePurchase)


      I want to create a report showing 4 rows and value columns for several years. The rows should be:



      Cost of Sales


      Gross Profit



      For that, I created an Excel-table and uploaded it into my application:


      Sort    Position          Variable

      1        Sales              vSales

      2        Cost of Sales  vCostOfSales

      3        Wastage         vWastage

      4        Gross Profit    vGrossProfit



      After loading the table into QlikView, I created a cross table and set "Position" as dimension. When I use the field "Variable" as formula, QlikView shows the different variable names as text expression in each line, exactly as in the table above.


      How can I make QlikView recognizing that it should present me the value of the variable that is named exactly as the field value is?



      Thanks in advance!