Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

STACK CHART ISSUE

MonthQuarterDim1Sales1Sales2
JanQ1A4596
FebQ1A6797
MarQ1A4598
AprQ2A7895
MayQ2A8995
JunQ2A9995
JulQ3A8995
AugQ3A8983
SepQ3A8984
OctQ4A8984
NovQ4A8984
DecQ4A8984
JanQ1B9484
FebQ1B9584
MarQ1B9584
AprQ2B9584
MayQ2B9584
JunQ2B9584
JulQ3B9584
AugQ3B9591
SepQ3B9592
OctQ4B9592
NovQ4B9592
DecQ4B95

92

I would Like to do a Stacked Bar Chart for the Above Data with Dim1 as First Dimension and Quarter as Second Dimension.

Sales 1 and Sales 2 are the Metrics.

I would like to accomplish the Stacked  Bar Chart as shown in the Attached file.

Any Help is appreciated

6 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thnx for the help , but no attachment

Not applicable
Author

Got the Attachment, Thnx will review

Not applicable
Author

Its very helpful, but Sales1 and Sales2 are a part of a big Data Set, I cant Pivot the other fields in there. like you are doing in the Crosstable

Gysbert_Wassenaar

Perhaps a synthetic dimension works. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Your QVW works gr8  for the sample data set I posted, but when I apply the same logic to my actual Data Set, I dont get Quarters  to stack up.

I have a Stack Chart Below with three Dimensions

1)  (vValueListL1) which is ValueList('Case Reserves')

2) ValueList('Actual','Expected')  as Fake Dimension to give me 2 Bars

3) Quarters (Like Q1,Q2,Q3 and Q4)  (they are Cumulative

. Expression is

If($(vValueListL1)='Case Reserves',

(Pick(Match(ValueList('Actual','Expected'),'Actual','Expected'),

Num(Sum({<NEW_YTD_FLAG={'1'}>}(OUTST_INDEMNITY_RESERVE_YTD+OUTST_EXPENSE_RESERVE_YTD)),'#,##0'),

Num(Sum({<NEW_YTD_FLAG={'1'}>}(OUTST_INDEMNITY_RESERVE_YTD+OUTST_EXPENSE_RESERVE_YTD)*0.5),'#,##0'))))

Stack_Chart_Issue.PNG

I Expect the Quarters to Stack up on Each Bar.  Please help