The result is correct, when no Date Selection is applied. When Date is selected, the expression is ignoring the date selection.
What I need is when selecting any Date, the Range Value keeps the correct running total for that date, idcategoria, idsubcategoria and only show the selected date(s).