Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

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

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

1 Reply
Not applicable

I hope i understand your question...

You could use COLUMN(n) to get the value from a specific column.

For example:

COLUMN(2) to get the value in the second column.

Cheers