Forum Discussion
Format time/date on X-Axis
Hi - Power BI Community!
I want to show only 2019 October as 2019.10 or 10.2019 (no day)
or
only once 2019 and once 2020 - not at the beginning of all months.
I tried to change the date/time format but nothing has change I use the dax:
Thank you for your time.
Anonymous , Create a month year column and sort on month year sort column
Month Year = format([Date],"mm.yyyy")
or
Month Year = format([Date],"yyyy.mm")
sort on
Month Year sort = format([Date],"yyyymm")
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
2 Replies
- amitchandakSuper User
Anonymous , Create a month year column and sort on month year sort column
Month Year = format([Date],"mm.yyyy")
or
Month Year = format([Date],"yyyy.mm")
sort on
Month Year sort = format([Date],"yyyymm")
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
- themistoklisCommunity Champion
Anonymous
You can convert datetime to Year-Month using the following formula:
Year-Month = FORMAT('Table'[Date], "yyyy.mm")ORYear-Month = FORMAT('Table'[Date], "mm.yyyy")ORYear-Month = ( YEAR('Table'[Date])*100+MONTH('Table'[Date]) )Then add it to axis