Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to combine 2 chart into 1 ?

Hi All

I have chart 1 Expression as below :-

money(

sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}$(ColumnDim51)/$(Columndim89)/1000)

, $(vMoneyFormatK))

I have chart 2 expression as below :-

money(pick(

match([Pls select 66 Dim],'rEVENUE','sales','eXP','n_PRO'),

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)/1000,

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)/1000,

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)*-1/1000,

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)/1000 ),

$(vMoneyFormatK))

My imagine Solution as below not working  :-

money(pick(

match([Pls select 66 Dim],'rEVENUE','sales','eXP','n_PRO'),

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)/1000,

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)/1000,

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)*-1/1000,

Sum({<$(ColumnDim51)={$(ColumnDim51)}>}Amount)/$(Columndim89)/1000 ),

match([Pls select 6st Dim],'sales','cost','profit'),

sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}$(ColumnDim51)/$(Columndim89)/1000),

$(vMoneyFormatK))

)

Hope some one can advise me where go wrong ?

Next posting i will post my QC Doc.

Paul

12 Replies
sunny_talwar

And I think the second If(GetSeletedCount... statement either needs to repeat the expression 3 times (for sale, cost and profit), or use if instead of Pick

paulyeo11
Master
Master
Author

Hi Sunny

Finally now working fine , as long as i never use the if , the chart display out very fast.

Also i must thank Kush , he already mentioned in his post below msg , which i just notice.

try with Pick() & match() to optimize the IF

Below is the expression working fine :-

money(pick(

match([Pls select 67 Dim],'n_PRO','sales','cost','profit','eXP','rEVENUE'),

Sum({<$(ColumnDim67)={$(ColumnDim67)}>}Amount)/$(Columndim89)/1000,

sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}sales/$(Columndim89)/1000),

sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}cost/$(Columndim89)/1000),

sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}profit_amt/$(Columndim89)/1000),

Sum({<$(ColumnDim67)={$(ColumnDim67)}>}Amount)/$(Columndim89)*-1/1000,

Sum({<$(ColumnDim67)={$(ColumnDim67)}>}Amount)/$(Columndim89)/1000),

$(vMoneyFormatK))

Paul

paulyeo11
Master
Master
Author

Hi Kush

I just happen to join the 2 ColumnDim into 1, now my chart plot very fast. This new break thru will save me many sheet. Thank you very much,

Paul

Sent from my iPhone