Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All...
I have a pivot table which shows 8 quarters of data... i need to show only last 4 quarters of data... i.e from 2011Q4 to 2012Q3
Please click on image to enlarge..
Thanks
Hi,
Depending on your data model, you need to select your last 4 quarters.
You can do this in the following ways:
1. Use a flag in your data load to mark if your date is in the last 4 quarters.
if(salesdate > addmonths(today(),-12) and salesdate < today(),1,0) AS SalesFlag
you can then use Set analysis or the slower if to select your Quarters:
SUM({<SalesFlag={1}>} Sales)
SUM(SalesFlag * Sales)
SUM(if(SalesFlag=1,Sales,0))
2. Use Set Analysis
http://www.qlikblog.at/1384/set-analysis-wizard-qlikview/
http://community.qlik.com/qlikviews/1062
3. Use Qlikview Components
http://code.google.com/p/qlikview-components/
Kind Regards,
Dion
Message was edited by: Dion Verbeke
Hi Ganesh,
Try this expression
2011Q4 - 2012Q3 = Sum({<BilledDate={'>=$(=QuarterStart(Max(BilledDate), -4))<=$(=QuarterEnd(Max(BilledDate), -1))}>} Sales)
Hope this helps you.
Regards,
Jagan.