Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
shashank20
New Contributor III

Stacked chart problem

Hi Geniuses,

I have the below data

         

ACCOUNT_LABELHCBUHCEntityHCMonthHCScenarioHCTypesHCViewHCYearHeadcount
HC1000T1215000MDCMGMTJanActual_InterimEmiratisYTD20151
HC1000T1215000MDCMGMTJanActual_InterimEmiratisYTD20154
HC1000T1215000MDCMGMTJanActual_InterimExpatsYTD20152
HC1000T1215000MDCMGMTJanActual_InterimExpatsYTD20154
HC1000T1215000MDCMGMTJanActual_InterimTotalHeadCountYTD20153
HC1000T1215000MDCMGMTJanActual_InterimTotalHeadCountYTD20158
HC1000T1331000MDCMGMTJanActual_InterimEmiratisYTD201525
HC1000T1331000MDCMGMTJanActual_InterimExpatsYTD201512
HC1000T1331000MDCMGMTJanActual_InterimTotalHeadCountYTD201537
HC1000T1425600MDCMGMTJanActual_InterimEmiratisYTD201572
HC1000T1425600MDCMGMTJanActual_InterimExpatsYTD201577
HC1000T1425600MDCMGMTJanActual_InterimTotalHeadCountYTD2015149
HC1000T1425800MDCMGMTJanBudgetUpdatedEmiratisYTD201526
HC1000T1425800MDCMGMTJanBudgetUpdatedExpatsYTD201538
HC1000T1425800MDCMGMTJanBudgetUpdatedTotalHeadCountYTD201564
HC1000T1713000MDCMGMTJanBudgetUpdatedEmiratisYTD201517
HC1000T1713000MDCMGMTJanBudgetUpdatedExpatsYTD201524
HC1000T1713000MDCMGMTJanBudgetUpdatedTotalHeadCountYTD201541

I am using the formula for Emiratis actual values  =num(Sum({<HCMonth = {$(=vMonth)},HCScenario={'Actual_Interim'},HCTypes={'Emiratis'},YEARID = {$(=YearVariable)}>} Headcount) ,'#,##0;(#,##0)')

Expats actual values  =num(Sum({<HCMonth = {$(=vMonth)},HCScenario={'Actual_Interim'},HCTypes={'Expats'},YEARID = {$(=YearVariable)}>} Headcount) ,'#,##0;(#,##0)')


Emiratis Budget values  =num(Sum({<HCMonth = {$(=vMonth)},HCScenario={'BudgetUpdated'},HCTypes={'Emiratis'},YEARID = {$(=YearVariable)}>} Headcount) ,'#,##0;(#,##0)')



Expats actual values  =num(Sum({<HCMonth = {$(=vMonth)},HCScenario={'BudgetUpdated'},HCTypes={'Expats'},YEARID = {$(=YearVariable)}>} Headcount) ,'#,##0;(#,##0)')


Now I want the stacked bar chart in which one bar show actual Emirati and expats values and the other bar show Budget values of emirati and expacts


Attached is the pic how graph should look like


1 Reply
mov
Esteemed Contributor III

Re: Stacked chart problem

I recommend to remove HCScenrio and HCTypes from the expressions completely, and use these fields as dimensions.  It will be easy after that to get a stacked bar chart.