Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an expression with a default Open orders period, and ignoring Invoice dates selections.
sum({<InvoiceYear=, InvoiceQuarter=, InvoiceMonth=, InvoiceWeek=, InvoiceDate=,OpenYear=, OpenQuarter=, OpenMonth=, OpenWeek=, OpenDate=, OpenDateKey={">=$(=Num(YearStart(Max(OpenDateKey)))) <=$(=Max(OpenDateKey))"}>}Amount)
The issue is: selection of Invoice year is not ignored when Open period is selected by a user.
Can someone please explain why?
Thanks!
Max({<InvoiceIssueYear=>}OpenDateKey)
this will ignore the InvoiceIssueYear selection.
The expression you did earlier is max(openDateKey).
So it will still evaluate without ignoring the InvoiceIssueYear selection.
sum({<InvoiceIssueYear=, OpenYear=, OpenDateKey={">=$(=Num(YearStart(Max({<InvoiceIssueYear=>}OpenDateKey)))) <=$(=Max({<InvoiceIssueYear=>}OpenDateKey))"}>} Amount)
This expression consists of 3 component to be evaluated:
For the expression to work well, you have to add in "InvoiceIssueYear=" to the max(OpenDateKey), so that:
- when InvoiceYear is selected, it will ignore this selection and return the max(OpenDateKey)[eg:1/Oct/2019] to the base expression of:
Can you provide a sample app that shows what is the current result shown in the expression vs the expected result that should be displayed?
Hi Arthur,
I Attached a sample model and screen captures.
I also updated the issue: selection of Invoice year is not ignored when Open period is selected by a user.
Thanks!
Try this:
sum({<InvoiceIssueYear=, OpenYear=, OpenDateKey={">=$(=Num(YearStart(Max({<InvoiceIssueYear=>}OpenDateKey)))) <=$(=Max({<InvoiceIssueYear=>}OpenDateKey))"}>} Amount)
Indeed, that works!
Frankly, I don't understand what you added, nor why it doesn't work without it..
What are the cases when dates selections are not ignored?
Thanks!
Max({<InvoiceIssueYear=>}OpenDateKey)
this will ignore the InvoiceIssueYear selection.
The expression you did earlier is max(openDateKey).
So it will still evaluate without ignoring the InvoiceIssueYear selection.
Hi Arthur,
Would you kindly clarify why InvoiceIssueYear= doesn't have the same impact?
Thank you!
sum({<InvoiceIssueYear=, OpenYear=, OpenDateKey={">=$(=Num(YearStart(Max({<InvoiceIssueYear=>}OpenDateKey)))) <=$(=Max({<InvoiceIssueYear=>}OpenDateKey))"}>} Amount)
This expression consists of 3 component to be evaluated:
For the expression to work well, you have to add in "InvoiceIssueYear=" to the max(OpenDateKey), so that:
- when InvoiceYear is selected, it will ignore this selection and return the max(OpenDateKey)[eg:1/Oct/2019] to the base expression of: