Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with Before finction

I am using the before function along with rangeavg to calculate forecast sales in  a pivot table.The dimensions are product and MonthYear.It works well but when I keep another dimension OF quarters horizontally above monthyear then all values are zero.The reference manual says this for before function:-

If the pivot table has multiple horizontal dimensions, the current row segment will include only columns

with the same values as the current column in all dimension rows except for the row showing the last horizontal

dimension of the inter field sort order. The inter field sort order for horizontal dimensions in pivot

tables is defined simply by the order of the dimensions from top to bottom

Cant understand what does this mean exactly and how should i modify my pivot table.Could someone please explain this:--

1 Reply
swuehl
MVP
MVP

That's just trying to define the so called row segments, though it's quite hard to understand, I agree.

Have you come across the column segments in a table? Row segments are just the equivalent for horizontal dimensions in a pivot table.

You can see the row segment bounderies by using rowno() function in your pivot.

I assume you need to apply the TOTAL qualifier to your before function (assuming that you want to ignore the row segment bounderies). Not sure why you get zero for all values, though.

Can you post your complete dimensions and expression here? Or even better, a small sample file?