Forum Discussion

Hansss's avatar
Hansss
Frequent Visitor
4 years ago
Solved

Transform Start/End date to Stacked Area timeline?

Hi,
I have a number of projects with start date and end date stated.

I would like to visualize how many projects are active each month, in a stacked area chart or similar.
Any input on how I should go about this?

Thanks!

  • Hi Hansss 

     

    You can first add a Calendar (Date) table to the model, then create the following measure. 

    Active Projects = 
    CALCULATE (
        COUNT ( 'Table'[Project] ),
        'Table'[Start_Date] <= MIN ( 'Calendar'[Date] ),
        'Table'[Finish_date] >= MAX ( 'Calendar'[Date] )
    )
    

    Use Calendar's Month column on the X-axis of the stacked area chart. 

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

2 Replies

  • Hansss's avatar
    Hansss
    Frequent Visitor

    I'll try to give some examples to better explain what I'm looking for.

     

    Project 1

    ProjectStart_DateFinish_dateStrategy
    P12022-01-012022-09-01S1
    P22022-02-012022-09-01S1
    P32022-03-012022-10-01S2

     

    With this information I want to create a graph over how many projects are active each month.

    Later on I want to divive them by Strategy and make a stacked area chart, but that's step 2 I guess..

    • v-jingzhang's avatar
      v-jingzhang
      Icon for Community Support rankCommunity Support

      Hi Hansss 

       

      You can first add a Calendar (Date) table to the model, then create the following measure. 

      Active Projects = 
      CALCULATE (
          COUNT ( 'Table'[Project] ),
          'Table'[Start_Date] <= MIN ( 'Calendar'[Date] ),
          'Table'[Finish_date] >= MAX ( 'Calendar'[Date] )
      )
      

      Use Calendar's Month column on the X-axis of the stacked area chart. 

      Best Regards,
      Community Support Team _ Jing
      If this post helps, please Accept it as Solution to help other members find it.