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.
Hello Everyone! Hoping you can help.
I have a column I created that gets the Day of Week from a Date. I'd like to sort that Day of Week in my visual by date from oldest to newest and not by weekday. I'm tyring to show the last 7 days but by Weekday instead of an actual date, but the Weekday either sorts alphabetically or numberically (1, 2, 3, ect..). How can I get it to sort by the actual date?
Note, that I'm working in Direct Query
Thank you!
Hi @ThisIsIt ,
quick and dirty.
Put the date in the tooltip and sort by the Earliest date.
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Hi @ThisIsIt ,
has your question been answered?
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
You can change the 'Sort by' of a column. In your case, you could create a new table with daynumber - dayname rows (so 7 rows), and then create a relationship between that table and you real table. (based on dayname). Then select the dayname column (in Dataview), and select 'Sort by' daynumber. In your visual, insert the dayname column of the new table as axis, and values from your original table. Then sort the visual on dayname (which sorts it to daynumber).:
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
Proud to be a Super User!
Unless I'm missing what you are saying, I'm actually trying to sort by Date and not Number. I have my visual set for a relative date of 1 week. I'd like to have the most recent date to the right and the oldest to the left, but displayed by WeekDay instead of date. I tried selecting the WeekDay column and changing the sort by from the modeling tab but it threw an error (see below).
Hi @ThisIsIt ,
according to my understanding, @JarroVGIT suggestion is right.
First on power query, arrange your date in ascending order or descending order
Then have an index column that corresponds to your Weekname.
Then on Modeling tab, you can use the sort the week by the index column you made.
or
Simply have a date table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |