Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Period Ending Date - Time Intelligence

Hi eveyone ...again,

 

I am trying to get a "Period Ending Date " column to appear as shown in the picture below. 

 

Period Ending Date

The first column "13-Nov-19" should track a date range from 12th Oct 19 - 13th Nov 19. The dates will automatically change each day. That is, the next day being 14th Nov 19 would show "14-Nov-19" and track a date range from 13th Oct 19 - 14th Nov 19. I would like to track this into the future (7 months ahead as in picture) and into the past (6 months behind). 

 

many thanks for any help. 

 

KayCent

1 Reply

  • You have to create few measures like this

     

    Rolling month = 
    Var _date =DATE(YEAR(TODAY()),MONTH(TODAY())-13,DAY(TODAY()))
    return
     CALCULATE(COUNT('Sales'[Sales Date]),DATESINPERIOD('Date'[Date Filer],_date,1,MONTH))

     

    in place of -1 , you can use any number from 0 whatever month you want to go in the past. -13, just to show that it can handle if the month becomes negative change year.

     

    Use this on KPI check what date you get

    Rolling month = 
    Var _date =DATE(YEAR(TODAY()),MONTH(TODAY())-13,DAY(TODAY()))
    return
    _date 

     

    Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
    Thanks.

    My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601