Forum Discussion

tc_WII's avatar
tc_WII
Frequent Visitor
2 years ago
Solved

Fetch matching date value or latest date value

Hello,    I have a data model with 2 fact tables: SalesData, ItemReceived, date and product table.   I want to create a simple table visual with Date, Average Selling Price (From Sales Data), Cos...
  • parry2k's avatar
    2 years ago

    tc_WII I think it should be:

     

    LastCostMod =
        CALCULATE(
            LASTNONBLANKVALUE(dimDate[Date],MAX(itemReceived[Cost])),
           FILTER( 
            ALL(dimDate),
            dimDate[Date] <= MAX(dimDate[Date])
            )
    )