Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
Partner
Partner

Re: Issue with stacking accumulation in bar chart

Thanks Kamiel,

I can see that this works in the example. But when I apply this in my actual scenario, it is not working for unknown reasons. I ended up adding five separate expressions (each for each category) in the chart to make it stack.

Regards,

Vishnu

Partner
Partner

Re: Issue with stacking accumulation in bar chart

Hi All,

Thanks a lot for the different options you all provided. In my actual scenario I found that the best solution was to

- remove category dimension

- month-year will be the only dimension

- setting the chart styling to 'stacked'

- added 5 expressions (one each for each category)

- expression example  RangeSum(Above(Sum{<Category={'Inclusion'}>}([Sales Qnty]),0,RowNo()))

Cumulative Stack Solution.png

Regards,

Vishnu

Re: Issue with stacking accumulation in bar chart

Not sure, but can this work?

Capture.PNG

Script

Table:

LOAD MonthYear&Category as Temp,

TimeSort,

    MonthYear,

    Category,

    [Sales Qnty]

FROM

[Cumulative Stack Example.xls]

(biff, embedded labels, table is Sheet1$);

TempTable:

LOAD MonthYear

Resident Table;

Join (TempTable)

LOAD Category

Resident Table;

Concatenate(Table)

LOAD MonthYear,

Category

Resident TempTable

Where Not Exists(Temp, MonthYear&Category);

DROP Table TempTable;

Expression

Aggr(RangeSum(Above(Sum([Sales Qnty]),0,RowNo())), Category, MonthYear)

or this if you don't have MonthYear sorted correctly in script and you have QV12 or above

Aggr(RangeSum(Above(Sum([Sales Qnty]),0,RowNo())), Category, (MonthYear, (numreic)))

vvira1316
Valued Contributor II

Re: Issue with stacking accumulation in bar chart

Hi Vishnu,

I'm glad to know that you found the solution you were looking for. If you won't mind and if possible can you please post what exactly worked for you (expressions, settings, etc.) with sample data/app for the help of community.

Thanks,

Vijay