The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello community,
I'm very new to Power BI.
I have imported a dataset into Power BI desktop.
I have created a Line Chart visual. The actual values are correct, but I can't appear to get the order of the dates correct.
Can someone take a look at the visual and let me know where I might be going wrong.
The data is as follows:
My line chart is as follows:
The measure looks like the following:
Let me know if you need the PBIX?
Thanks
Solved! Go to Solution.
Hi @caplogic ,
I created some data:
Thank @PowerBigginer for sharing, and here’s a method I’d like to share with you all:
Power BI's default sorting is alphabetical, so you'll need to create a [Month] column and an [Index] table for sorting.
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _table1=
CALENDAR(
DATE(2023,1,1),DATE(2023,12,31))
var _table2=
ADDCOLUMNS(
_table1,"Month",FORMAT([Date],"mmm"))
return
SUMMARIZE(
_table2,[Month],"mindate",MINX(FILTER(_table2,[Month]=EARLIER([Month])),[Date]))
2. Joining a relationship between two tables
3. Select [Month] – Column tools – Sort by column – [mindate].
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @caplogic ,
I created some data:
Thank @PowerBigginer for sharing, and here’s a method I’d like to share with you all:
Power BI's default sorting is alphabetical, so you'll need to create a [Month] column and an [Index] table for sorting.
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _table1=
CALENDAR(
DATE(2023,1,1),DATE(2023,12,31))
var _table2=
ADDCOLUMNS(
_table1,"Month",FORMAT([Date],"mmm"))
return
SUMMARIZE(
_table2,[Month],"mindate",MINX(FILTER(_table2,[Month]=EARLIER([Month])),[Date]))
2. Joining a relationship between two tables
3. Select [Month] – Column tools – Sort by column – [mindate].
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi PowerBigger,
Thanks for getting in touch.
I tried your suggestion, but it doesn't appear to be working.
See screenshots below:
Dax Error please check your table I guess you don't have date column in your table try this way
Create Month Num column in your date table
then add MonthName to your Line chart
If it helps Please Mark as a solution
For more power bi tips and tricks visit https://powertipstricks.blogspot.com/
Thanks & Regards