=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java' --- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2013-09-29 15:24:12 +0000 +++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java 2013-09-30 13:56:22 +0000 @@ -58,6 +58,7 @@ import static org.hisp.dhis.period.PeriodType.getPeriodTypeFromIsoString; import static org.hisp.dhis.reporttable.ReportTable.IRT2D; import static org.hisp.dhis.reporttable.ReportTable.addIfEmpty; +import static org.hisp.dhis.system.util.DateUtils.daysBetween; import java.util.ArrayList; import java.util.Arrays; @@ -250,8 +251,10 @@ if ( valueMap != null ) { Period period = filterPeriod != null ? filterPeriod : (Period) DimensionItem.getPeriodItem( options ); + + int days = daysBetween( period.getStartDate(), period.getEndDate() ); - Double value = expressionService.getIndicatorValue( indicator, period, valueMap, constantMap, null ); + Double value = expressionService.getIndicatorValue( indicator, period, valueMap, constantMap, days ); if ( value != null ) {