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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
bc5891
Contributor III
Contributor III

Rolling Average Stacked Bar Causing Duplication Within Trending Axis

Hi - I have a horizontally stacked bar chart which is stacked by field = Status the measure is counting IDs

The date axis is populated using a variable: [$(=$(vDateAxis))] which is populated by a dropdown.

I am trying to calculate a 3 period rolling average. i.e. if monthly is selected it would look at current month plus previous 2 months and do an average, same for year, same for quarter etc.

I am having an issue whereby the months get duplicated when trying my expression:

 

bc5891_1-1688981843313.png

The measure I am using is :
Aggr(nodistinct RangeAvg(Above(Count(distinct {<[$(=$(vDateAxis))]>}[ID]),0,2)), ([$(=$(vDateAxis))], (Numeric)))

vDateAxis is the variable which populated the Date axis and .  The date axis populates the axis correctly, but when this expression is used the duplication happens.

I cannot share my app unfortunately but any help would be appreciated.

Thanks

Labels (2)
0 Replies