Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

calculation versus previous week

Hello Community,   Hope you are well.   I would appreciate it if you could help me with the below.    Table details: The table shows the despatch schedule (in pallet quantities) of three sites...
  • HotChilli's avatar
    4 years ago

    You need a Calendar table (based on Shipment Date, it should have columns for WeekNo, Year).

    Create a relationship to the main table on Shipment Date

    For the first table, you should be able to create a matrix with WeekNo, Extraction Date and a measure for SUM( Pallets Number).

    --

    The second table requires a measure using the measure already created so something like:

    MeasureX - CALCULATE(MeasureX, PREVIOUSMONTH(ExtractionDate))   

    it won't be exactly this, DAX time intelligence features work best with a calendar, so that would involve another calendar table for extraction dates.  OR you could create the previous date by calculating it manually