Forum Discussion

MotherMary1810's avatar
MotherMary1810
Regular Visitor
4 years ago

Assistance on creating bar chart

HI, I am new to Power BI and trying to create a bar chart with time on the x axis and get bars for various systems on the y axis showing the time availability of each system.  See below sample data where time is in half hour intervals.

  The x in the table indicates that the system is available at this time.  Can someone please assist as I require separate bars for each system and only get stacked charts for this.

 

 

5 Replies

  • MotherMary1810 , No data table is visible. But seems like you need to use a column on the legend

     

    If this does not help
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Graphically, it should look like the table except the time will be at the bottom ie. x axis

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MotherMary1810 ,

     

    You could unpivot the columns of time in the Power Query editor.

    In your case, select the Systems column, then click 'Unpivot Other Columns'.

    Then you will get the Attribute column and the Value column.

    Change the Attribute column to Time type. Then click 'Close&Apply'.

     

    Create a measure to count the "x".

    Measure = CALCULATE(COUNT('Table'[Value]),FILTER('Table',[Value]="x"))

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • MotherMary1810's avatar
      MotherMary1810
      Regular Visitor

      Thanks Stephen, however as mentioned, do not want a count, want bars for each system parallel to each other during the times that the system is available.  In other words, one axis will have all the system names with bars parallel running from start time to end time.