Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add a calculated column in Pivot table

Dear All,

I have a data set something like this, I am trying to create a pivot table in Qlik Sense with some Calculated field.

Capture.PNG

This is the desired structure of my Pivot Table. But I am facing issue with the calculated fields.
I am not finding any way to add these two calculated fields to my Pivot Table.

Capture.PNG

Any Help will be highly appreciated.

1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

Hello,

am I right that your datas contains 4 fields:

Client, Location, Amount and Tag?

And you created a Pivottable with 2 Fields, 1 Column (Tag) and one expression?

And now you want to add two other calulations that are not in the data....

So change your Pivot:

delete the column Tag

delete your expression

add Expression:

sum({<Tag={Revenue}>} Amount)   -> Label it Revenue

sum({<Tag={Cost}>} Amount)   -> Label it Cost

sum({<Tag={Efforts}>} Amount)   -> Label it Efforts

Amount-Cost    -> Label it Gross Margin

Revenue/Effort     -> Label it Revenue/Effort

Regards

View solution in original post

6 Replies
Chanty4u
MVP
MVP

add measure column and what is the logic for  gross margin ? 

for revenue/effort   create meausre as     direct write sum(Revenue)/sum(effort)

martinpohl
Partner - Master
Partner - Master

Hello,

am I right that your datas contains 4 fields:

Client, Location, Amount and Tag?

And you created a Pivottable with 2 Fields, 1 Column (Tag) and one expression?

And now you want to add two other calulations that are not in the data....

So change your Pivot:

delete the column Tag

delete your expression

add Expression:

sum({<Tag={Revenue}>} Amount)   -> Label it Revenue

sum({<Tag={Cost}>} Amount)   -> Label it Cost

sum({<Tag={Efforts}>} Amount)   -> Label it Efforts

Amount-Cost    -> Label it Gross Margin

Revenue/Effort     -> Label it Revenue/Effort

Regards

beck_bakytbek
Master
Master

Hi Abhishek,

look at this:

Column - chart function ‒ Qlik Sense

i hope taht helps

Beck

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Pallav,

Please find the attachment

Thanks,

Arvind Patil

Not applicable
Author

Thanks a lot everyone.
Really appreciate your effort.
I tried something similar to @martin pohl and its working fine as of now

Not applicable
Author

I have created a Measure for Gross Margin ,so now I have a column for Gross Margin in my pivot
but here I am strucked again

I am trying to create custom filter through which I can select data based on Gross margin.

My filter will be something like

Gross Margin

1. Below 30%
2. 30-40%
3.40%+

is this possible ??