Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
simonagheo
New Contributor III

Two fields, one dimension

Hello,

I have a table which contains accounting notes, whith the following fields: CreditAccount, DebitAccount, CreditAmount, CreditAmount and I need a report that can show the credit and debit amount for any account. I need to make only one dimension based on CreditAccount and DebitAccound and it must be selectable.

Do you know how to solve this?

Thank you!

5 Replies
Partner
Partner

Re: Two fields, one dimension

Hi Simona,

Please provide sample data and expected output then we will guide more closely.

Thanks,

Arvind Patil

simonagheo
New Contributor III

Re: Two fields, one dimension

Hi,

The input table is like that:

    

CreditAccountDebitAccountCreditAmountDebitAmount
XY1000
YZ099

And the needed output:

   

AccountCreditAmountDebitAmount
Y10099

Thank you!

Partner
Partner

Re: Two fields, one dimension

Hi Simona,

What is the logic  for calculation means  what scenario you considered for this:

AccountCreditAmountDebitAmount
Y10099

Thanks,

Arvind Patil

effinty2112
Honored Contributor

Re: Two fields, one dimension

Hi Simona,

Shouldn't your output be

Account CreditAmount DebitAmount
X100 
Y00
Z 99

?

Regards

Andrew

aronwilliamson
Contributor

Re: Two fields, one dimension

Hi,

As Andrew said your output (For this example) would be as he has put. Is that what you intended?

1 way of doing this would be to create 2 tables in qlikview based on the data that you have i.e. load credit account and credit amount in 1 table and debit account and debit amount in the second table.

The you could create a link between Credit Account and Debit account as "Account". I have represented it inline in the attached app.

Table1:

LOAD

CA as %Key_Account,

CreditAmount;

LOAD * Inline

[

CA,DA,CreditAmount,DebitAmount

X,Y,100,0

Y,Z,0,99

];

Table2:

LOAD

DA as %Key_Account,

DebitAmount;

LOAD * Inline

[

CA,DA,CreditAmount,DebitAmount

X,Y,100,0

Y,Z,0,99

];