Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
KKumar92
Contributor III
Contributor III

Calculation of Total Sum Between two Date Range

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;

DATEQTYvMiDatevPrDateSUM
31/01/202110031/01/202130/01/2021100
1/2/20212531/01/202131/01/2021100
2/2/20215031/01/20211/2/2021125
3/2/20212531/01/20212/2/2021175
Labels (3)
10 Replies
KKumar92
Contributor III
Contributor III
Author

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.