Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
yali
Contributor
Contributor

Measures for 2 dim - P&L Chart

I got a problem using P&L Chart. Could anyone kindly help?

  1. The first column was created by valuelist, e.g. Gross Margin = Revenue + COGS.
  2. The second dimension in this P&L Chart (A,B,C,D) is shown in the first row.
  3. The measure is calculted by

pick(rowno(),
Sum({<ProfitLoss={'Revenue'}>}Amount),
Sum({<ProfitLoss={'COGS'}>}Amount),
Sum({<ProfitLoss={'Revenue','COGS'}>}Amount)....

The problem is the Revenue of A will be shown in the column of A. Under the column of B, I have COGS everywhere. (Please refer to the screenshot below).

What should I do to have the result like help document?

Many thanks!

yali_0-1598964576097.png

 

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@yali  You may need to modify your expression like below

pick(Match(valuelist('Revenue','COGS',....),'Revenue','COGS',......),
Sum({<ProfitLoss={'Revenue'}>}Amount),
Sum({<ProfitLoss={'COGS'}>}Amount),
Sum({<ProfitLoss={'Revenue','COGS'}>}Amount

... )

View solution in original post

4 Replies
Kushal_Chawda

@yali  You may need to modify your expression like below

pick(Match(valuelist('Revenue','COGS',....),'Revenue','COGS',......),
Sum({<ProfitLoss={'Revenue'}>}Amount),
Sum({<ProfitLoss={'COGS'}>}Amount),
Sum({<ProfitLoss={'Revenue','COGS'}>}Amount

... )

View solution in original post

AbhijitBansode
Specialist
Specialist

Just wondering the use of valuelist in this case. Not sure if you actually need it. You have below output if you use pivot table:

AbhijitBansode_0-1598967220668.png

With below settings:

AbhijitBansode_1-1598967283461.png

 

yali
Contributor
Contributor
Author

Thank you for your answer. But I need valuelist to create manuelly subsum (e.g. Revenue + COGS).

yali
Contributor
Contributor
Author

Huge thanks for quick answer.