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.
So currently I am trying to display the date and month in order but get the following:
I have setup my calendar table as:
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)
)
I have setup the chart with the following details:
And have tried selecting the line chart then selecting the field and clicking on Sort by Column:
Does not help and the line chart stays the same.
This is what the calendar table looks like:
Can anybody provide me with some help as what I am doing wrong here?
Solved! Go to Solution.
I just found a work around by adding the "Date Month Number" field to the Tooltips and then I can sort:
@tiztrain Can you please check and confirm whether the "Date Month Number" field is "Whole Number" Data Type or not.
Proud to be a PBI Community Champion
Sorry forgot to mention that I had checked this
Hi @tiztrain
It seems you may try to add another table to set the order. Below is the article for your reference. If it is not your case, please share some data sample and expected output. You can upload it to OneDrive or Dropbox and post the link here.
http://www.excelnaccess.com/custom-sorting-in-power-bi/
Regards,
Cherie
@tiztrain Did you tried with this option on the chart.
Proud to be a PBI Community Champion
The chart displays in Date Month Text but I want to sort by the Date Month Number.
How can I add this as an option to sort by?
I just found a work around by adding the "Date Month Number" field to the Tooltips and then I can sort:
Hi @tiztrain
Glad to hear you've solved it, please accept the helpful answer or your solution as solution, that way, other community members will easily find the solution when they get same issue.
Regards,
Cherie
Hi @tiztrain
Based on my test, it seems there is no better way to do that.
Regards,
Cherie
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 | |
97 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |