Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
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
Partner

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
Champion III
Champion III

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
Partner

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

beck_bakytbek
Master
Master

Hi Abhishek,

look at this:

Column - chart function ‒ Qlik Sense

i hope taht helps

Beck

arvind_patil
Partner
Partner

Hi Pallav,

Please find the attachment

Thanks,

Arvind Patil

Not applicable

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

Not applicable

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 ??