Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a report that uses a fiscal_month and fiscal_week and this will produce a monthly report and a weekly report.
What i am now trying to do is to say the following:
if(
// Show week and month report for first two weeks of the month
'X',
//else only show weekly report for the last 2 weeks of the month.
'Y'
)
I have the condition to show the report working; i am just trying to figure out how to show the weekly and monthly for the first two weeks and the weekly for the 3 and 4 week.
Any ideas?
Perhaps any one of these?
If(Sum({<Month = {'$(=Max(Month))'}, Week = {">=$(=Min(Week)) <=$(Min(Week+1))"}>} Measure),'X',
If(Sum({<Month = {'$(=Max(Month))'}, Week = {">=$(=Max(Week)) <=$(Max(Week-1))"}>} Measure),'Y'))
OR
Sum(Aggr(If(Sum({<Month = {'$(=Max(month))'}, Week = {">=$(=Min(Week)) <=$(Min(Week+1))"}>} Measure),'X',
If(Sum({<Month = {'$(=Max(month))'}, Week = {">=$(=Max(Week)) <=$(Max(Week-1))"}>} Measure),'Y')), Month, Week))