Forum Discussion

rcister's avatar
rcister
Frequent Visitor
5 years ago
Solved

rocio

Hello.
I need help. I need to see the mesuare accumulated

I the mesuare is:

 

AccumulatedYTD =
CALCULATE (
[ADR Month], FILTER (ALL (Calendar), Calendar [Date] <= MAX (Calendar [Date])))

 

([ADR Month] is another mesuare = ((Sum(RoomNigths))/(Sum(Reveneus)))

 

 

Thanks!



  • rcister I am thinking:

    AccumulatedYTD =
      VAR __Table = 
        ADDCOLUMNS(
          FILTER(ALL('Calendar'), Calendar[Date] <= MAX('Calendar'[Date])),
          "__ADRMonth",[ADR Month]
        )
    RETURN
      SUMX(__Table,[__ADRMonth])
  • Hi,

    Does this measure work:

    AccumulatedYTD = CALCULATE([ADR Month],DATESBETWEEN(Calendar [Date],MINX(ALL(CALENDAR),calendar[date]),max(calendar[date])))

    Ensure that on the X-axis of your visual, you drag Year and Month from the Calendar Table.

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    rcister I am thinking:

    AccumulatedYTD =
      VAR __Table = 
        ADDCOLUMNS(
          FILTER(ALL('Calendar'), Calendar[Date] <= MAX('Calendar'[Date])),
          "__ADRMonth",[ADR Month]
        )
    RETURN
      SUMX(__Table,[__ADRMonth])
  • Hi,

    Does this measure work:

    AccumulatedYTD = CALCULATE([ADR Month],DATESBETWEEN(Calendar [Date],MINX(ALL(CALENDAR),calendar[date]),max(calendar[date])))

    Ensure that on the X-axis of your visual, you drag Year and Month from the Calendar Table.