Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I'm looking to get sales from Day 1 of the month we were in 3 months ago to date.
Solution 1. accomplishes this. But I see other developers using a solution 2. approach. Which one would you use and what is the difference?
1. Sum({<[Date]={">=$(=date(monthstart(addmonths(today(),-3))))"}>}[OrderLines.Net Order Amount])
2. sum({<OrderID = {"=([Date]>= $(=date(monthstart(addmonths(today(),-3))))"}>}OrderLines.Net Order Amount)
I would use option 1 over option 2 where you are checking at the chart level to keep only those rows where Date is greater than the 3 months back. The second option goes by OrderID and check if the condition is met or not. There are times when you cannot use Option 1, is when I would use Option 2.
I would use option 1 over option 2 where you are checking at the chart level to keep only those rows where Date is greater than the 3 months back. The second option goes by OrderID and check if the condition is met or not. There are times when you cannot use Option 1, is when I would use Option 2.