Forum Discussion
Text as the chart source.
I would like the text from the column "date"="41;205;61;182;81;200;101;207;121;211;141;209;161;204;181;198;201;187;221;181;241 ;176;261;169;281;163;301;161;321;156;341;155;361;153;381;153;401;152" to the chart source.
Where the odd order of occurrence is the X-axis and the even-order is the Y-axis. How to go about it.
3 Replies
- Sahir_MaharajSuper User
Hello adriano692833,
To plot the values from the "date" column in the format you provided as a scatter chart, you need to split the text into separate X and Y coordinate values.
- Create a new query by clicking on "Transform Data" in the Home tab of the Power Query Editor.
- Select the "date" column, and click on "Split Column" -> "By Delimiter" in the ribbon.
- In the "Split Column" dialog box, select "Custom" as the delimiter type, and enter ";" as the delimiter. Also, select "Rows" as the split option.
- Rename the two new columns to "X" and "Y", respectively.
- Change the data type of both "X" and "Y" columns to "Whole Number" by selecting the columns and clicking on "Data Type" -> "Whole Number" in the ribbon.
- Close and apply the changes to the query.
Once you have the new query with the X and Y columns, you can use it as the source for your scatter chart.
Should you require further assistance, please do not hesitate to reach out to me.
- adriano692833New Member
Thank you for your answer.
But how to divide the data so that in column X there are only odd value IDs and in column Y even.
- Sahir_MaharajSuper User
- Create a new query by clicking on "Edit Queries" in the Home tab.
- Select the table containing the "date" column.
- Click on the "Transform Data" button.
- Click on the "Split Column" dropdown and select "By Delimiter."
- In the Split Column dialog box, select "Custom" as the delimiter type.
- Enter a semicolon ";" as the custom delimiter.
- Select "Even Columns Only" and click "OK."
- Rename the new column to "Y" by right-clicking on the column header and selecting "Rename."
- Repeat steps 4-8, but this time select "Odd Columns Only" and rename the new column to "X."
- Close and Apply the changes.