I'm trying to create a calculated measure that will aggregate sales data for each Monday in the 1st week of the month. I was able to calculate the total using the SQL formula below, but was wondering if anyone had the MDX equivalent?
set @mon1sales = (select sum(sales) as totalsales from salestable1, Dim_Calendar_Date2 where salestable1.start_date = Dim_Calendar_Date2.FullSQLDate and datepart(dw, salestable1.start_date) = 2 and Dim_Calendar_Date2.PositioninMonth = 1)
Thanks.
set @mon1sales = (select sum(sales) as totalsales from salestable1, Dim_Calendar_Date2 where salestable1.start_date = Dim_Calendar_Date2.FullSQLDate and datepart(dw, salestable1.start_date) = 2 and Dim_Calendar_Date2.PositioninMonth = 1)
Thanks.