Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am working on a report, where I want to calculate the Sum of Quantity for a given date range. And I have used the following expression for the measure.
Sum({$<DATE = {'>=$(=$(vMiDate))<=$(=$(vPrDate))'}>}QTY_ONHAND)
However, I am getting the answer as zero. Please advise how this could be rectified.
Variables;
vMiDate = Min(Total DATE)
vPrDate = Date((Max(DATE) - 1), 'DD/MM/YYYY')
Expected Output;
DATE | QTY | vMiDate | vPrDate | SUM |
31/01/2021 | 100 | 31/01/2021 | 30/01/2021 | 100 |
1/2/2021 | 25 | 31/01/2021 | 31/01/2021 | 100 |
2/2/2021 | 50 | 31/01/2021 | 1/2/2021 | 125 |
3/2/2021 | 25 | 31/01/2021 | 2/2/2021 | 175 |
Thanks for the advise and solution, I applied the set analysis for the current date stock calculation and merged both to get the expected output.
Thanks Again.