Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I need to calculate prev 4months...im still new at this set analysis and qlikview so pls can some1 jst help me and walk me through the expression...my dimention is month year...What i need to do is get the current month and 4 months back the total of my income for all 4 months together, and then they want me to / that with the outstanding debt on the last day of the last month...Pls can anyone help????
Thanx in advance
Regards Stevie
Here you have an example for 3 months
Expression is:
=Sum({<YearMonth ={">=$(=date(addmonths(date#('$(vYearMonth)','MMM-YYYY'),-2),'MMM-YYYY')) <=$(=date#('$(vYearMonth)','MMM-YYYY'))"}, Year=,Month=>} Sales)
Hi,
Please send me the sample application i will help u.
Dont know how never done that before....
Hi Stevie,
You could try this Set Analysis:
Selected month:
=SUM({1<[Month]={$(=MONTH(ADDMONTHS(MAX([Date]),0)))},[Year] ={$(=YEAR(ADDMONTHS(Max([Date]),0)))}>}[LineSalesAmount])
prev. month:
=SUM({1<[Month]={$(=MONTH(ADDMONTHS(MAX([Date]),-1)))},[Year] ={$(=YEAR(ADDMONTHS(Max([Date]),-1)))}>}[LineSalesAmount])
2 months back:
=SUM({1<[Month]={$(=MONTH(ADDMONTHS(MAX([Date]),-2)))},[Year] ={$(=YEAR(ADDMONTHS(Max([Date]),-2)))}>}[LineSalesAmount])
etc.
Regards,
Anton
Here you have an example for 3 months
Expression is:
=Sum({<YearMonth ={">=$(=date(addmonths(date#('$(vYearMonth)','MMM-YYYY'),-2),'MMM-YYYY')) <=$(=date#('$(vYearMonth)','MMM-YYYY'))"}, Year=,Month=>} Sales)
How will i do this for the previous year same months.