Forum Discussion

pelucapampa's avatar
pelucapampa
Helper I
5 years ago

Metric: Calculate Sum with two dates columns

Hi all, i need to calculate SUM when one Column have the Pivot Date and the other date column have de dates.

For example in my table I've a lot o rows with same Pivot Date (Today) and in other columns the days for next 3 month.

 

I need to Calculate SUM when Pivot Date it's Today or LastDate and all of rows for this month or next month.

I'm trying with this Measure.

 

HONM = CALCULATE(SUM(EstadOcupacion[HabOcupadas]),LASTDATE(EstadOcupacion[Pivot]), DATESBETWEEN(EstadOcupacion[Fecha],STARTOFMONTH(LastDate(EstadOcupacion[Pivot])),ENDOFMONTH(LASTDATE(EstadOcupacion[Pivot]))))

 

Thanks all

1 Reply

  • Please provide sample data in usable format (not as a picture) and show the expected outcome.