Forum Discussion

RYOH_0130's avatar
RYOH_0130
Regular Visitor
2 years ago
Solved

Difficulty Extracting Previous Month's Data

Dear all,   I am currently facing an issue with extracting data from the previous month in PowerBI. I have a column named 'Date_Period_SEQ' that represents the sequence of months(ex.Tim...
  • amitchandak's avatar
    2 years ago

    RYOH_0130 , Have a separate date/period table Joined with your table and then try

     

    PreviousMonth_No.of Buyer
    = CALCULATE(
         SUM('Consumer Report'[No. of Buyer]),
         FILTER( all('Period'), 'Period '[Date_Period_SEQ] = MAX('Period'[Date_Period_SEQ])-1 ) )
     
     
    Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
    Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s