Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Adding date to my measure

Here is my measure:   Absorptions Per Month = ROUND(SUM('Data by Bedrooms'[Bedroom Sales])/6,0)   Absorptions per month is simply all the sales divided by months for the reporting period (6).  ...
  • edhans's avatar
    7 years ago

    If you have a Dates table, it would be something along the lines of:

    Absorptions Per Month =
    CALCULATE (
        ROUND ( SUM ( 'Data by Bedrooms'[Bedroom Sales] ) / 6, 0 ),
        FILTER ( Dates, Dates[Month] = 12 ),
        FILTER ( Dates, Dates[Year] = 2018 )
    )

    Assuming your Dates table is Dates, and you have a Month and Year column in it.