Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have bar chart, for that i need to display the current week data as one bar and the previous week data as another bar by default. when we select a date,it should consider the week of that date as current week and the previous week of that as previous. how can i achieve the same.
Thanks in advance
hii,
i have tried this.hope its workin nw..
=sum({<Week={$(=Max(Week))},Cust_Week=,@_Date=,Year=,Day=,@_Month=,I_PLANT={'Autofit Daruhera Plant'}>} I_CURRENT_REQ_QTY)
= sum({<I_PLANT={'Autofit Daruhera Plant'},Week={$(=Max(Week-1))},Cust_Week=,@_Date=,Year=,Day=,@_Month=>} I_CURRENT_REQ_QTY)
Even this too is helpful
Write
Dimension :- week
Expression Current Week:- =sum({<Week={$(=(Week))>} Sales Val)
Expression Previous Week:- =sum({<Week={$(=(Week-1))>} Sales Val)
Regards
Hi Reena,
Derive week field from your date and follow Anand method
sum(Date={"$(=Max(MyDate))"}) for Current Date say its Sunday
sum({$<Date={"$(=only(MyDate)-7)"}>}sales) Previous Date Last Sunday
Hi,
First generate Week field from your table script by using this
Week(DateField) as Week
and Follow anand's post
Hi,
but i need to take the dimension as Date, when i select the Date the corresponding week information and the previous week information should display.
i tried the above ,but its not working .dont kno why..
Thanks...
Update i think it will give you correct out put for Date field
Take a Date field as dimension and in expression write
For current week =sum({< Week = {'$(=Max(week(Date)))'}>} Sales)
For Previous week =sum({< Week = {'$(=Max(week(Date))-1)'}>} Sales)
Hope this helps
Hi,
Try like this
=Sum({<Week=, Year=, Month=, Quarter=, Date={'>=$(=WeekStart(Max(Date), -1))<=$(=Date(Max(Date)))'}>} MeasureName)
Regards,
Jagan.