Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated Dimension

Hi all,

I have data in two dimensions as below.

Doc Type-------------------- Amount

INV                              2313

INV                           234123

DN                              (2321)

INV                              1123

DN                              (123)

I want to take INV sums in one column and DN sums in other column and then Gross Profit (Calculated Dimension) in third column.

Please advise.

BR,

SAK

4 Replies
sreenivas
Creator III
Creator III

Hi

PFA of the File .

Not applicable
Author

Hi

for first expression

sum(if(Doc Type='INV',Amount))

2nd expression

sum(if(Doc Type='DN',Amount))

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try to create a straight chart with following expression.

     Dont need to have dimention in your case.

     1. Sum({<Doc_Type = {"INV"}>}Amount)

     2. Sum({<Doc_Type = {"DN"}>}Amount)

    

     3. column(1) - column(2)   for gross profit.

               or else

  

Sum({<Doc_Type = {"INV"}>}Amount) -

Sum({<Doc_Type = {"DN"}>}Amount)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sushil353
Master II
Master II

Hi,

Is it what you are looking for.

Please find the attached file

HTH

Sushil