Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

tdiwanji
New Contributor

Qlik Sense - How to add calculated field in the WorkSheet

I have a table with customer name, total sales, total expenses. However, I want to add forth column in my worksheet as Profit/Loss by calculating (Total Sales - Total Expenses) for each row. Can someone help me how to do so ?

As is

NameTotal SaleTotal Expense
Ram5000040000
Pramod4000020000
Vijay30005000

To be

NameTotal SaleTotal ExpenseProfit
Ram500004000010000
Pramod400002000020000
Vijay30005000-2000

**** Please provide me the solution, if I can add calculated measure or not.

5 Replies
felipedl
Valued Contributor III

Re: Qlik Sense - How to add calculated field in the WorkSheet

HI,

The link that described the creation of calculated dimension is:

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Dimensions/calculated-dimensions.h...

vishsaggi
Esteemed Contributor III

Re: Qlik Sense - How to add calculated field in the WorkSheet

Did you try adding this new column profit with expression like below

and what are your expr used for Total Sales and TotalExpenses can you share them?

= YourTotalSalesExpr - TotalExprenseExpr

tdiwanji
New Contributor

Re: Qlik Sense - How to add calculated field in the WorkSheet

Tried originally this way only, thinking it as a simple =A-B expression by creating a dimension. However this didn't work. Getting neither results nor error.

vishsaggi
Esteemed Contributor III

Re: Qlik Sense - How to add calculated field in the WorkSheet

‌can I know your expr used for total sales and total expenses?

Re: Qlik Sense - How to add calculated field in the WorkSheet

Thread seems straight forward. What problem and how you are calculating for both?