Forum Discussion

adriano692833's avatar
adriano692833
New Member
3 years ago

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

  • 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.

     

    1. Create a new query by clicking on "Transform Data" in the Home tab of the Power Query Editor.
    2. Select the "date" column, and click on "Split Column" -> "By Delimiter" in the ribbon.
    3. In the "Split Column" dialog box, select "Custom" as the delimiter type, and enter ";" as the delimiter. Also, select "Rows" as the split option.
    4. Rename the two new columns to "X" and "Y", respectively.
    5. 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.
    6. 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.

    • adriano692833's avatar
      adriano692833
      New 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_Maharaj's avatar
        Sahir_Maharaj
        Super User
        1. Create a new query by clicking on "Edit Queries" in the Home tab.
        2. Select the table containing the "date" column.
        3. Click on the "Transform Data" button.
        4. Click on the "Split Column" dropdown and select "By Delimiter."
        5. In the Split Column dialog box, select "Custom" as the delimiter type.
        6. Enter a semicolon ";" as the custom delimiter.
        7. Select "Even Columns Only" and click "OK."
        8. Rename the new column to "Y" by right-clicking on the column header and selecting "Rename."
        9. Repeat steps 4-8, but this time select "Odd Columns Only" and rename the new column to "X."
        10. Close and Apply the changes.