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
gaikwadaa123
Helper II
Helper II

Sort Date and Value columns

Hello, 

I have a data that looks like below:

gaikwadaa123_0-1626207433639.png

 

I would like sort the DEP, DEC and DOM column in descendig order for whatever the date range EST (Datetime )Column is selected. 

Example 

if I select date 1/1/2020 and 1/2/2020 for both the dates it should arange the DEP DEC and DOM values form Highest to lowest.

1/1/2020 high to low and 2/2/2020 high to low, 1/3/2020 high to low.

In current scenario If i try to order them in descending order it mixes the dates and hours by decending the values considering the full range of all dates.

 

I would like to see High to low for each date selection. 

Please suggest me the DAX or any solution based on the column names I have. Thank you.

 

 

 

5 REPLIES 5
Preeti_Yadav
Resolver I
Resolver I

Hi @gaikwadaa123 

As per the my understanding of the scenario,
You just need to right click on the columns and select the option of sort descending,it wll sort you data in desceding order.

If this you dint meant just provide some more specific details about it.


Thanks !

Thank you for the response. 

I am not looking for the whole data sorting as such. 

 

I am looking for  high to low limited to that day only. it should not mix up my dates while sorting the whole data. 

example: Today: high to low

Tomorrow: High to low

not like take the whole today and tommorrow series and sort by both days. 

Do you get what I am saying. Sort has to be limited for that day, for next day it should take 24 hours and sort them , for another day take 24 hours and sort them. 

It should not take 48 hours and sort all 48...

It should 24, 24 24 ,24 hours sorting limited to the day.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

No DAX is needed for this. In your table in Power BI (I assume you are using a table visual - you didn't say) just select first by DEP. Then press SHIFT and sort again by DEC, then finally DOM. Now those 3 columns are sorted as you like. Changing what dates show up won't affect those sorts, just the records visible.

If that isn't what you want, please be more specific. The image you show is from Power Query, and end users don't work in Power Query so sorting there will have no effect on a report.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Thank you for the response. 

The solution you suggested sorts the whole data by mixing the dates. 

I would like to get the data sorted in such way that it example. for today it will show high to low value and if I select another date it will show high to low value. so on. 

what i do not want: when i select today and tomorrow it should not mix the hours of these two dates while sorting high to low. 

Currently as per your suggestion it will show today today tommorow today tommorrow tommorow.....

What I want Today High to low:

Tommorwo high to low. 

sort should be limited to that day only.

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.