Dax formula to calculate except for the particular date range , I need all remaining sales
last 2 weeks uncleared sales =
VAR Date_Range= DATESINPERIOD(Date_Table[Date], LASTDATE(Date_Table[Date]) -WEEKDAY(LASTDATE(Date_Table[Date]),2),-14,DAY)
Return
CALCULATE(
CONCATENATEX(
VALUES(TABLE[Sales item]),Table[sales item],UNICHAR(10)),
Date_Ranage
)
it is giving the output for last 2 weeks sales. but I need sales for all the dates except the given date_range.
ex: consider in the sales table I have sales data from 1st Jan to 22nd Jan
my VAR Date_Range expression gives 3rd Jan to 16th January. so I need output as (1st jan to 2jan sales)+( 17th Jan to 22nd Jan) i.e remaining days sales except for the given date_range.
please help me with this. thanks in advance.
Write measure this way:
last 2 weeks uncleared sales =
VAR Date_Range= DATESINPERIOD(Date_Table[Date], LASTDATE(Date_Table[Date]) -WEEKDAY(LASTDATE(Date_Table[Date]),2),-14,DAY)
Return
CALCULATE(
CONCATENATEX(
VALUES(TABLE[Sales item]),Table[sales item],UNICHAR(10)),
not(Date_Table[Date] in Date_Ranage)
)