Forum Discussion
Anonymous
6 years agoNot applicable
Column Chart - Past 6 Months
How would you show the last 6 months on a column chart (on the X axis). So if I want to show the previous 6 months of April I want it to appear as the following Nov > Dic > Jan > Feb > Mar> Apri...
v-juanli-msft
Community Support
6 years agoHi Anonymous
Show last 6 months data, you could create measures
last month = EDATE(TODAY(),-1)
Measure 2 = CALCULATE(SUM('Table'[value]),FILTER('date',DATEDIFF([Date],[last month],MONTH) in {0,1,2,3,4,5}))
To sort the month name as expected, you could refer to the following:
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
If it doesn't solve your problem, you could use format "2019-02" instead of "Feb" which can order the axis as expected.
Use FORMAT([date],"yyyy-mm") can get this format.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
It's not working for me... I must be doing something wrong.