Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i need help. I have a table F0902 with fields month, Id, Company, Amount.
I want to get the sum of amount when i click on month ListBox.
i.e when i select
- March i want to get : amount of January+February+March
-July i want to get : amount of January+February+March+April+May+June+July
-...
How can I do ? Please help.
thanks
I believe you could use set analysis to do this kind of point in time or YTD analysis.
Please check this post:
http://community.qlik.com/message/2255
and if you are not famliar with set analysis, the Help pages. I found this blog also quite useful:
http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/
Hope this helps,
Stefan
Use this expression = Sum({<Month = {"<=$(vMaxMonth)"}>} Amount) and Create a new variable with this expresion =Max(Month) including =
Or try use this expression = Sum({<Month = {"<=$(=Max(Month))"}>} Amount) withot create a variable
try this set analysis
sum({<month={'<=' & 'num(month)'}>}Amount)
num(month) should be the months in your header, so check the specification
I prefer to define a variable:
vSelectedMonth = '<=' & num(month(XYZ)) where XYZ is the field of your selection month
and then
sum({<month={'$(vSelectedMonth)'}>}
hope this helps