Forum Discussion
monthwise previous year data on line chart
- 6 years ago
Hi Anonymous ,
You could create a measure and add it in the filter pane.
Measure = var a = DATEDIFF(SELECTEDVALUE('Table'[Date]),TODAY(),MONTH) return IF(a<=12,1,0)Then set the rule to show the result whose measure is 1.
Hi Anonymous
You can get the month dimension in your table by adding the following column to it:
monthNameShort =
FORMAT( Table[Date], "MMM" )
or
monthNameLong =
FORMAT( Table[Date], "MMMM" )
Then you can either use the Relaive Date Slicer if you want end users to adjust time period, or you can use the 'Top N' filter on the visual itself. You would filter on monthNameShort, Top N, Top 12, by Latest [Date].
Pete
Hi BA_Pete ,
I got your point but I can't use relative date slicer as it hampers my UI, I don't have to change my UI, Have some UI Constraints as well.
Need to do something by measure or creating column.
Thanks !
- BA_Pete6 years agoSuper User
No problem.
Just add the monthName column, use this as the chart axis, and then use the visual-level filter to do the Top N solution I mentioned.
Pete