5 Replies Latest reply: Dec 15, 2015 11:59 AM by Tobias Hassmann 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:

       

      Sales

      Cost of Sales

      Wastage

      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!