Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I previously had a problem trying to get my data to sort correctly based on one field while displaying another field in the line graph widget
https://community.powerbi.com/t5/Desktop/Sort-by-another-column-issue/m-p/550420#M258958
I was able to figure out that by adding the field I wanted to sort by into the Tooltips, I was able to sort the chart correctly.
The issue that I have now is when I try to sort by the field Month Year Number (which has also been added to the tooltips), it does not display in order.
My calendar is still:
PROD Calendar =
VAR Days = CALENDAR(MIN('LCP_Contacts'[Visited Date]),MAX('LCP_Contacts'[Visited Date]))
RETURN ADDCOLUMNS(
Days,
"Year", YEAR([Date]),
"Year Sort", 10000 - YEAR([Date]),
"Month Number", MONTH([Date]),
"Month", FORMAT([Date],"mmmm"),
"Month Year Number", YEAR([Date]) * 100 + MONTH([Date]),
"Month Year Text", FORMAT([Date],"mmm yyyy"),
"Date Month Number", DAY([Date]) + MONTH([Date]) * 100 + YEAR([Date]) *10000,
"Date Month Text", FORMAT([Date], "dd mmm"),
"Fiscal Year", YEAR([Date]+184),
"Fiscal Year Sort", 10000 - YEAR([Date]+184)
)
My calendar table still looks correct to me:
By hovering over the data to see the tooltip I have realised that BI sums the table together in this chart:
But on my previous chart from my original post, the field in the tooltips does not get added together:
I am a bit lost to what the difference is?
Solved! Go to Solution.
Hi @tiztrain,
You can refer to following blog to know how to create a custom sort table with 'sort by column' feature to manually apply sort order of specific column:
Regards,
Xiaoxin Sheng
Hi @tiztrain,
Did you try sorting the MonthYearText column by MonthNumber.
Cheers
CheenuSing
Yes I did.
As I highlighted in the original post, Sort by Column in the Modeling tab did not work.
The only way to get it to work with my other chart was to add the field in the tooltip section and then sort by
Hi @tiztrain,
You can refer to following blog to know how to create a custom sort table with 'sort by column' feature to manually apply sort order of specific column:
Regards,
Xiaoxin Sheng
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |