Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot Table Column

How do I add a column into a table that has a formula consisting of the first column minus the second column, making my new column the third column? Essentially I want to create a column that has a formula using pre-existing data, that responds to Qlicksense filters as well. Please let me know, thanks you!

7 Replies
isingh30
Specialist
Specialist

Can you share some sample input & output of your requirement?

Anonymous
Not applicable
Author

For example, I have forecasted revenue in column 1 and actual revenue in column 2. I would like to create a third column that subtracts our actual revenue from our forecasted revenue, however if we filter according to month, I would like the formula to change according to the month/filter as well. Is there any way to insert this column directly with a filter from Qlicksense and not uploading it from a data source.

rittermd
Master
Master

I'm not sure that I understand your question.

A filter by default will recalculate your columns based on your choice.  The 3rd column that you want should just be an expression consisting of the code from the first one minus the code from the second one giving you the difference in the 3rd column.

If that is not what you are asking let me know.

m_perreault
Creator III
Creator III

You can do the expression in your first column minus your expression in your second column ie.

Sum(ForecastedRevenue)- Sum(ActualRevenue)

or  you could also do column(1) - column(2) but if you switch around your column orders this would obviously change.

Anonymous
Not applicable
Author

How do you add a column directly into Qlicksense?

Anonymous
Not applicable
Author

How do you add a column directly into Qlicksense?

markp201
Creator III
Creator III

The column headers in your table work the same as fields.  For example

PriceQuantityTotal
[Order Line Price][Order Line Quantity][Price] * [Quantity]

You can use column(1) * column(2) but this is a relative reference.  if you hide a column it affects the column # reference.