Forum Discussion

gsmith_eqd's avatar
gsmith_eqd
Frequent Visitor
3 years ago
Solved

Next Week Projected Sales

Hello, I'm trying to create a measure for a report that displays the sum of the sales amount for the following week by filtering based on the shipdate column. There is no error appearing in the fo...
  • FreemanZ's avatar
    3 years ago

    hi gsmith_eqd 

    try first adjust the return type of the 2nd WEEKNUM:

    EstimatedInvoicing =

    VAR __ThisDate = TODAY()

    VAR __ThisWeek = WEEKNUM(__ThisDate, 1)

    VAR __NextWeek = __ThisWeek + 1

    VAR __ThisYear = YEAR(__ThisDate)

    RETURN

     

    CALCULATE([TotalSales], WEEKNUM(SalesOrderLine[ShipDate], 1) = __NextWeek && YEAR(SalesOrderLine[ShipDate]) = __ThisYear)