Forum Discussion

bendejnp's avatar
bendejnp
Icon for Helper I rankHelper I
4 years ago
Solved

Using active and inactive in one measure

Hello,   Below is a simplified example of the dataset showing the orders with an order date and a date for requisted delivery.    Example data:   order date and requested delivery date ar...
  • johnt75's avatar
    johnt75
    4 years ago

    OK, try

    Turnover MTD = 
    var mtd = DATESMTD( 'Calendar'[Date])
    return CALCULATE( SUM('Table'[Turnover]),
    REMOVEFILTERS('Calendar'),
    TREATAS( mtd, 'Table'[Order date]),
    TREATAS( mtd, 'Table'[Delivery date])
    )

    You may need to alter the REMOVEFILTERS if the order day & month aren't coming from the Calendar table.