Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, in line chart, how do I display data for only the last 6 months? Cause' dimension limits only have the option of displaying first,largest and smallest values. Thanks.
Sum({$ < Year = {">=$(Year(Today())-5)"}>} Sales)
if it is just a simple dimension, then create a calculated dimension as follows:
if (Year >= Year(today())-5, Year)
Then check "Suppress when null"
Thanks,
Ram
Hi Rachel,
Try this expression
=Sum({< YearDimensionName=, QuarterDimensionName=, MonthDimensionName =, DateDimensionName= {'>=$(=MonthStart(Max(DateDimensionName), -5))<=$(=Date(Max(DateDimensionName)))'}>} MeasureName)
Replace YearDimensionName, QuarterDimensionName, MonthDimensionName, DateDimensionName and MeasureName with your actual fields.
Hope this helps you.
Regards,
Jagan.
Hi Jagan,
How can I do this in dimenssion level.
Regards
Anup
Hi,
Try
In UI:
=Sum({<YearMonth=, Num(Date#(YearMonth,'YYYYMM')) = {">=$(=Num(AddMonths(Max(Date#(YearMonth,'YYYYMM')),-5)))<=$(=Num(AddMonths(Max(Date#(YearMonth,'YYYYMM')),0)))"}>} MeasureName)
Or
Inscript:
LOAD *,
if(Date >= AddMonths(MonthStart(today()), -5) and Date <= monthstart(today()), 1, 0) as Flag6Month
RESIDENT Table;
And use flag as required
Regards
Neetha