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: 
Not applicable

Ruuning Average Issue

I have qvw that has chart which shown running average of last 13 month.  Soon I pick a year in selection, I expect running average should still be intact but only that years shows up with values. Somehow X-Axis shows weird order and latest months show up in between which messes up running average as well.. Please see qvw attached and screenshot with no selections and with selection

Normal Behavior.png

Now When I select Year 2015, It brings wrong order in x-Axis as shown below which messes up running average. PLEASE HELP

Abnormal Behavior.png

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you want to see only the selected period then wrap the unaggregated strings in the five info expressions in an Only() function:

old:  ='CalYear/Month = '&[CalYear/Month]

new:  =Only('CalYear/Month = ') &[CalYear/Month]

Your CalYear/Month field contains only text values. Those cannot be sorted numerically. You can sort by an expression like only({1}CalKey). Or better create CalYear/Month as a dual field: Date(MonthStart(MyDate),'MMM YYYY') as [CalYear/Month]


See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
perumal_41
Partner - Specialist II
Partner - Specialist II

do you need only 2015 years data , then remaining all zero values are suppressed .

like below

sujeetsingh
Master III
Master III

Faisal either supress zero or missing (nulls) else assign zero to nulls or missing.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you want to see only the selected period then wrap the unaggregated strings in the five info expressions in an Only() function:

old:  ='CalYear/Month = '&[CalYear/Month]

new:  =Only('CalYear/Month = ') &[CalYear/Month]

Your CalYear/Month field contains only text values. Those cannot be sorted numerically. You can sort by an expression like only({1}CalKey). Or better create CalYear/Month as a dual field: Date(MonthStart(MyDate),'MMM YYYY') as [CalYear/Month]


See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks.. It seems they are sorted properly and also running average for 36 months is calculated correctly. I wanted to know how this work.  Why info expressions were messing up running calculations and order in X-Axis