Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I don't think power BI likes my data.
I'm trying to plot an average week of data, as a line graph/chart that has been calculated and put in the sheet provided. If I were to do it in excel, I would just select all the data and click the line chart button in the insert ribbon. I am trying to achieve this in power BI.
Here is my data:
Currenty I'm only able to graph the counts of my values against the first column and I am unable to stop it from sorting by either values or my first column alphabetically.
How would I go about making a line chart and how would I makes sure power BI is not sorting anything.
Solved! Go to Solution.
@jm9999999 , In the line visual put the numeric value in y-axis and time value in x-axis[The text].
This will sort the x axis on the basis of the text string. Now in the table section, click on the day/time column[text column], this will open column tools on the menu above. Go to sort column by and sort it by index column.
For ex., in this the city names[Text] are sorted on the basis of city ID[numeric]. The sort column by option is visible by clicking on the city button in table pane.
@jm9999999 , If this is what the requirement is,
Then,
1) This plotted for only 10 values of time.
2) Start by checking the data type of the day/time column.
3) X-axis -> time,
Y-axis-> Other fields
4) On Y-axis column in visualization pane, right click the column that can give the option to select the function that is required. In this case, it is the average function.
If sorting continues, go to the three dots of the visual and sort accordingly.
I had set my day time column to text. When I try to set it to time it drops the name of the day "Monday" and just displays the time and any day after Monday the day/time value errors due to the change in type. How would I make the format "nameOfDate" + "time" be considered time. or at the very least be similarly treated as an index or a timestamp.
There is no option to just have name of date + time. Have add the date, or create a column that can provide the distinction. In terms of text it will always sort the values one way or another.
Remember to use a 24-hour clock.
Is there anyway I can go about making a graph with these axis in power BI?
@jm9999999 Something could be done.
Try uploading the data using power Query and add another column of index.
Click transform data in PowerBI desktop. Then Enter Data, after the data is added go to Add column and add index starting from 1. this would order all the texting.
Then the desired result could be achieved.
I've tried this,
I am unable to prevent it from sorting my data points unless I put the index first and sort by index. If I do that it doesn't display the day time on the chart. Double clicking on the current sort by option doesn't disable the sorting.
I need the graph in index order but I want the x -axis to display the day time column in index order.
@jm9999999 , In the line visual put the numeric value in y-axis and time value in x-axis[The text].
This will sort the x axis on the basis of the text string. Now in the table section, click on the day/time column[text column], this will open column tools on the menu above. Go to sort column by and sort it by index column.
For ex., in this the city names[Text] are sorted on the basis of city ID[numeric]. The sort column by option is visible by clicking on the city button in table pane.
Thank you so much, I have been tearing my hair out over getting this graph right!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
84 | |
84 | |
72 | |
49 |
User | Count |
---|---|
143 | |
131 | |
109 | |
64 | |
55 |