Forum Discussion
jblindsey
4 years agoFrequent Visitor
Configuring Sparkline X-Axis
I have a matrix with one numeric value and a sparkline on that value. There is also a slicer (Year) that is also being used as the X-axis on the sparkline. What I'm trying to do is select only ...
amitchandak
4 years agoSuper User
jblindsey , if you want select one year and want to show data for 5 year, you need have an independent date/year slicer and use that to get 5 year data measure
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -60) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
jblindsey
4 years agoFrequent Visitor
Thank you Amit. I've been using your information to see if it will work in my scenario.