Forum Discussion
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
- amitchandak
Super User
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. - MotherMary1810Regular Visitor
Please note that I dont want any counts of the system
- MotherMary1810Regular Visitor
Graphically, it should look like the table except the time will be at the bottom ie. x axis
- AnonymousNot 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.
- MotherMary1810Regular 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.