Forum Discussion
Classificar Por Coluna
- Anonymous2 years ago
Hi Thiagops ,
This is the raw data I created for testing.
Date
Sales
2023/2/10
100
2023/2/8
250
2023/2/6
150
2023/2/2
200
Make sure that the 'CP_FUNC_INS_DTHR (2)' column is in the correct date format.
In Power Query, you can use the 'Transform' > 'Data Type' > 'Date' function to ensure that the column is being treated as a date.
Also in Power Query, you can try sorting the column directly before loading the data into the model.
Select the column 'CP_FUNC_INS_DTHR (2) ', and choose 'Sort Ascending'.
Create a index column in Power Query:
After loading the data into the template, you can define the sorting of the 'CP_FUNC_INS_DTHR (2) ' column using the 'Sort by Column' functionality.
Select the 'CP_FUNC_INS_DTHR (2) ' column in the fields panel, go to the 'Column Tools' tab and choose 'Sort by Column', selecting the index column you created.
The pbix file is attached.
For more details, please see the documentation:
Sort one column by another column in Power BI - Power BI | Microsoft Learn
If you can't solve it, can you provide me with the pbix link? Please do not log in to your account in Power BI Desktop when uploading pbix files.
I hope this information helps to solve the problem. I'm happy to answer any further questions you may have.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi Thiagops ,
This is the raw data I created for testing.
|
Date |
Sales |
|
2023/2/10 |
100 |
|
2023/2/8 |
250 |
|
2023/2/6 |
150 |
|
2023/2/2 |
200 |
Make sure that the 'CP_FUNC_INS_DTHR (2)' column is in the correct date format.
In Power Query, you can use the 'Transform' > 'Data Type' > 'Date' function to ensure that the column is being treated as a date.
Also in Power Query, you can try sorting the column directly before loading the data into the model.
Select the column 'CP_FUNC_INS_DTHR (2) ', and choose 'Sort Ascending'.
Create a index column in Power Query:
After loading the data into the template, you can define the sorting of the 'CP_FUNC_INS_DTHR (2) ' column using the 'Sort by Column' functionality.
Select the 'CP_FUNC_INS_DTHR (2) ' column in the fields panel, go to the 'Column Tools' tab and choose 'Sort by Column', selecting the index column you created.
The pbix file is attached.
For more details, please see the documentation:
Sort one column by another column in Power BI - Power BI | Microsoft Learn
If you can't solve it, can you provide me with the pbix link? Please do not log in to your account in Power BI Desktop when uploading pbix files.
I hope this information helps to solve the problem. I'm happy to answer any further questions you may have.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!