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,
need urgent help of yours:
I have a column Date (e.g. 01.01.2016), then I added columns Month and Year and concatenated them to get the column MonthYear(e.g. January2016):
Now the problem is, that I have date from 3 years(2016-2018) and I can not sort them correctly:
Here I sorted them by Month Number, but as you see, it doesn't work correctly. I can not sort them by column Date either, since I have multiple Date values for one MonthYear value.
So how could I sort MonthYear correctly, so that values Jan2017 and Feb 2017 will be shown after Months of 2016?
Could anyone help?
thanks a lot!
@tringuyenminh92
hm, it is a bit strange, because I get error message from Power BI, that says : the variation column Month and Year couldn't be found in the table:
Table1 is name of my table; Date is name of my Date column; I have Date in format dd.mm.yyyy.
I tried both German and English in the formula for the Month and Year, but it doesn't work.
And the same problem with YearMonthInt = Dates[Date].[Year]*100 + Dates[Date].[MonthNo] --> in my report I get error message.
Is DATES in your report the name of your table?
thanks for the help!
Hi @Jolyon,
yes, Dates is table name. Please ensure your data type of Date column is Date cause as my observation, i dont think your Date column is in Date type. So it doesnt support additional fields.
If you got problems with casting Date column, you could substring by left or Right method for your Date column and use Value() method to convert text to int.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |