Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am having a problem with the following expression:
(aggr(if(sum({<Week=,Period={$(=max(Period))}>} [Sales Forecast])=0, sum({<Week=,Period={$(=max(Period))}>}[Sales]),sum({<Week=,Period={$(=max(Period))}>}[Sales Forecast])),Week))
I want to show the sales (or forecasted sales) for a fiscal period. If I select a period then all is well. If I clear all my selections then that is OK too as it shows the sales for Period 12 (the max Period). However if I select one week then I want it to show the whole period sales for the period in which the week falls (ie if I select week 3 it will show Period 1 sales for weeks 1-4), but only the week I have selected shows. I thought that the <Week=> in the set analysis would have achieved this. Please help
Thanks
=SUM({<InvoiceWeek = P({1<InvoiceYear>})>}$(vSaleinEURO))
Replace Week = ,
Week = P({1<Period>})
Sorry Manish, still getting the same result
Try this
(aggr(if(aggr(sum({<Week=,Period={$(=max(Period))}>} [Sales Forecast]),Week)=0, aggr(sum({<Week=,Period={$(=max(Period))}>}[Sales]),Week),Aggr(sum({<Week=,Period={$(=max(Period))}>}[Sales Forecast]),Week)),Week))
-Nilesh
This isn't working either