Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to show my table in ascending order?

Hi,

I'm struggling to do something that seems to be simple. I want my table in Power BI to show the data based on the ascending order of the "Result Date Verif" column.
In the Transform data screen, I changed the order of this column so that it is shown in ascending order, as you can see in the image below:
d1.PNG

However, when returning to the normal screen of the table in Power BI, this column continues showing data in random order:

d2.PNG
I need this column to be in ascending order cause I have a calculated column that depends on that. How do I show the data in ascending order?

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @Anonymous,
You can change the field sort orders and add an index field to keeping these sorting orders. (power bi data model does not include row/column index, you can use added 'index' field as sort order field to keeping the order that defined in 'query editor')

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Nishantjain
Continued Contributor
Continued Contributor

@Anonymous , Even if you get your data in ascending order in Power BI (Data view), you cannot use the ascending order in your calculated column. There is no way to access the row of the data when creating a calculated column unlike you can do in excel.

 

To achieve what you need, can you explain what do you want your calculated column to do. You need to ignore the visual represensation of the rows in your table when creating a calculated column.

HotChilli
Super User
Super User

There's no guarantee that sort order in Power Query is maintained in the data view of PowerBi (I think that's what you mean by "normal screen of the table in Power BI").  You can use the 'sort' function from the column header in data view if you want.

With the calculated column you want to add, you shouldn't be relying on display sort order anyway.  You should rely on a date field or another column like an Index that you've added in Power Query.

simrantuli
Continued Contributor
Continued Contributor

Hi @Anonymous,

Ideally it should show in ascending order only if you have sorted it in the query editor already.

Could you please share the pbix with sample data?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.