Forum Discussion
bendejnp
Helper I
4 years agoUsing 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...
- 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.
v-cazheng-msft
Community Support
4 years agoHi bendejnp ,
You may try this Measure.
Turnover MTD =
VAR Today_ =
TODAY ()
VAR FirstDayOfMonth =
DATE ( YEAR ( Today_ ), MONTH ( Today_ ), 1 )
RETURN
CALCULATE (
SUM ( 'Append'[Turnover] ),
FILTER (
'Append',
'Append'[Order Date(YYYY/MM/DD)] >= FirstDayOfMonth
&& 'Append'[Requested Delivery Date(YYYY/MM/DD)] >= FirstDayOfMonth
)
)
Sample data:
The result looks like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun