Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Line chart

Hi there, 

 

I am new to Power BI and would like some help on the following topic.

I would like to create a line chart from the following (Example) data:

 

System name       Scope           Close date

System a              In Scope       01 sept 2020

System b             In Scope        01 dec 2020

System c              In scope 

System d              Out of scope

System e              In Scope        01 april 2021

System f               In Scope        01 dec 2020

 

 

I would like to create a line chart that starts on 01 jan 2020 with all the systems that are in scope, and will decrease with the systems that will be closed during the years.

 

So for example on the 1st of jan 2020 there are 100 systems in scope, on  the 1st of sept 10 systems will be shut down and on the 1st of dec 2020 another 30 systems will be shut down. 

 

How can I show this in a line chart?

 

Thanks in advance for your help.

 

  • Try

     

    Measure = CALCULATE(COUNT(systemclose[System name]),FILTER('systemclose',systemclose[Close date]<=max('Date'[Date])),systemclose[Scope]="In Scope")

    file is attached

     

     

2 Replies

  • Try

     

    Measure = CALCULATE(COUNT(systemclose[System name]),FILTER('systemclose',systemclose[Close date]<=max('Date'[Date])),systemclose[Scope]="In Scope")

    file is attached

     

     

  • Hi

    Create a calendar table for you x-axis then make the following measure:

    SystemsInScope =
    CALCULATE (
    COUNT ( table[system name] );
    FILTER ( ALL ( TABLE); Table[Close date] = MAX ( Calendar[Date] ) && Table[Scope] = "IN Scope" )
    )

    Then place this measure on the line values.