Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
The expression as below is woks fine that sum the amount >=vBDate and <=vEDate. How can I change the expression to sum the amount that >=vBDate and <=vEdate-1 (day before the vEdate)?
vBdate and vEDate are import date range.
Try this:
Sum({<[Entered Date]={">=$(vBDate)<=$(=vEDate-1)"}>}[SC Amount])
Hi, you can also do it this way:
Sum({<[Entered Date]={">=$(vBDate)<$(=vEDate)"}>}[SC Amount])
Hi Michael,
I tried it but it does not work. It ignored the vEdate-1 condition and sum amount that >=vBdate.
Most likely a formatting issue. When you add -1, the date format converts to integer. This should work:
=sum({$<[Entered Date]={">=$(=date(vBDate))<=$(=date(vEDate-1))"}>} [SC Amount])
I prefer this, it should work the same way:
=sum({$<[Entered Date]={">=$(=date(vBDate))"} * {"<=$(=date(vEDate-1))"}>} [SC Amount])
(I have similar expressions, they do work)
Thanks Michael,
It works right now.