1 Reply Latest reply: May 10, 2013 7:02 AM by Martin Grape RSS

    Formula in a diagram based on prior formulas - with IF clauses?

    Friedrich Hofmann

      Hi,

       

      I have two principally different datasets in my current document, mixed in one diagram: One is everything coming from the database - variable turnover_items, usually positive. The other one are fixed costs, on a monthly basis. These, too, are positive, though they are costs...

      Because of that fundamental difference, I would like to make the label of the formulas (which appears in the top row of the diagram) dependent on what the user has selected on the uppermost level: Currently I have the following IF formula there (example) to make that dependent on user selections:

       

      = IF(Getfieldselections(Umsatzart) = 'Fix', 'Kostenbudget', 'Budget Umsatz')

       

      The downside is, when I have these IF formulas in the label, I cannot create another formula based on these (principally easy, the difference between turnover and budget, both of which are in prior formulas) because QlikView doesn't accept the "simple" formula_names anymore, but only the complete formula.

      In principle, the structure is the same, I will write sth like

       

      = IF(Getfieldselections(Umsatzart) = 'Fix', (Monatskosten - Kostenbudget), (Umsatz - Umsatzbudget))

       

      The expression editor does not accept this.

      Can anybody help me there?

      Thanks a lot!

      Best regards,

       

      DataNibbler