Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Field

Hello,

I have a pivot table with a calculated field (Formula1).

Now i want to add a column with a formula (Formula2) that uses the calculated field (based on Formula 1).

How can i use the Field (Result Formula1) in the new Formual2 without calculating Formula 1 another time?

1 Solution

Accepted Solutions
simospa
Partner - Specialist
Partner - Specialist

A., did you solve your problem?

Please mark an answer as correct and so the issue can be closed.


Have a nice day.

S.



View solution in original post

9 Replies
rubenmarin

Hi, if your Formula1 column is called "Formula1" in the pivot table you can use this name:

Formula2 expression = [Formula1] + OtherOperations.

Be aware that Formula1 is not a field, just the label of the pivot table column.

roger_stone
Creator III
Creator III

Something like this for Formula2 - use the label for Formula1 as a field name in Formula2. If it has spaces in the name, wrap it in square brackets - so for example:

[Formula1] / 2

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

you can reference the existing Expression in two ways:

1. By label. For example, [Gross Sales] - if the label of your expression is Gross Sales.

2. By number, using the function Column(1) - for the first expression. In this case, your formula might break if the user can reorder columns by dragging and dropping. If this is your preferred solution, we recommend disabling "Drag and Drop" on the Presentation tab.

Check out my new book QlikView Your Business - you will learn this and many other secrets to solving complex analytical problems with QlikView and Qlik Sense.

best,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

simospa
Partner - Specialist
Partner - Specialist

Hi,

use the field label to reference a column. See the attachment and let us know.

S.

Not applicable
Author

Hello,

If i use column separate, i get the value but if i use column in formula it doesn't show me anything

This is the formula

BCum is result formula cumulate

=If(Sum([BCum])=0,'',(If(After(Sum([BCum]))=0,1,(Sum([BCum] - After(Sum([BCum])))/ After(Sum([BCum]))))) 

rubenmarin

Hi, you can try with:

=If([BCum]=0,'', If(After([BCum])=0,1,([BCum] - After([BCum]))/ After([BCum])))


Not tested, if you upload a sample I can try with real data. Be aware than Label names usually are shown in Blue, this Red name leads to a Field name, check that you don't have any field named as your column label. 

ahmar811
Creator III
Creator III

Use Column() function if you set Column(1) it take value which come from first expression like this

Not applicable
Author

Dear,

Kindly share sample data and required result if possible.

Regards,

Zain.

simospa
Partner - Specialist
Partner - Specialist

A., did you solve your problem?

Please mark an answer as correct and so the issue can be closed.


Have a nice day.

S.