Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create an expression that will show all the cases a customer purchased ealier in the week if the purchased yesterday. So if they bought from my company yesterday and monday then show mondays results. If they purchased yesterday and noting earlier in the week, nothing.
sum({$<[Customer Adj]=p({<[Invoice Date Num]={$(=vxToday-1)}>}), [Invoice Date Num]={">=$(=vxToday-6))<=$(=vxToday-2)"}>} [Cases_Aggr])
it isn't showing any cases for customers that ordered earlier in the week.
Okies... I thought he found it...
Regards,
Kaushik Solanki
Hi Daniel,
Hope this helps you. (refer attached)
sum({$<[Name]=p({<[Date]={'$(=date($(vxToday)-1))'}>})*p({<[Date]={'$(=date(weekstart($(vxToday)-1)))'}>}),Date={'$(=date(weekstart($(vxToday)-1)))'}>}Sale)
Br,
KC
Yyou have to check the data of Yesterday and Monday right? . Assuming you use the Today() function try the below
if( (Sum({$<[Invoice Date Num]={'$(=vxToday-1)' } >} [Cases_Aggr]) and sum({$<[Invoice Date Num]={'$(date( today() - (num(weekday(Today()))-1)))' } >} [Cases_Aggr]) ) >0 ,
sum({$<[Invoice Date Num]={'$(date( today() - (num(weekday(Today()))-1)))' } >} [Cases_Aggr]) ,
Sum({$<[Invoice Date Num]={'$(=vxToday-1)' } >} [Cases_Aggr])
)
Daniel Blois wrote:
That was a typo, so that isn't the issue. Have any other ideas?
Well, it would be helpful if you could add more context to your issue description: Data model, context of the expression in your chart (dimensions, other settings).
Then, try building the expression step by step. You can split your set expression into two expressions to check if the filter on the customer as well as the invoice date filter work as expected on their own.
Double check that your dollar sign expansions expands to the numbers you expect and that these numbers match the values in the date field.