Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tdiwanji
Contributor
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
Partner - Specialist III
Partner - Specialist III

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

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
Contributor
Contributor
Author

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

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

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful