
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Previous function in expression
Hi
I am trying to come up with a report that is showing change-% by material type compared to previous period with the expression in pivot.
The result at the moment can be seen in attachment. I am using there rangesum above function. In the attached picture it works like it should, but once I change the period into horizontal axis it doesn't work anymore. My script is in that case returning the result from the row above which is for different material type. How should I modife the script that it would look for previous result from left instead of above (from the previous period)? Or what would be the better solution to return the result for the same material from the previous period assume in that way this might work.
I am using at the moment following script in my previous column
rangesum(above(sum(MonthEndValue),1,1))
Thanks in advance
Regards
Janne

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For the columns, use BEFORE() function
If you need to make lots of calculation vs Y-1, previous period, perhaps you will need to modify your data model.
See a doc I have written a few weeks ago: http://community.qlik.com/docs/DOC-4821
Fabrice

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Have a look at the application.
Regards,
Kaushik Solanki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this hints but I think they are not something I can apply here. I could do this in script like Aunez proposed, but this would be only expression in where I would need that. That is why I would like to do this in expression.
It would be "inventory period" the dimension that I would like use here (previous in that dimension)
Thanks
Regards
Janne
