Forum Discussion
Show data based on slicer selection
Anonymous , Have these as the name of Date, Month , week and Qtr column, you want to display on axis
rolling 12 = // Same for month and qtr
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = date(Year(_max), month(_max) -12, Day(_max))+1
BLANK())
return
CALCULATE([net] ,filter(Date, Date[Date] >= _min && Date[Date] <=_min))
days
=
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = _max -30
BLANK())
return
CALCULATE([net] ,filter(Date, Date[Date] >= _min && Date[Date] <=_min))
for week you need use week rank column in date table
Week Rank = RANKX('Date','Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX('Date','Date'[Year Week],,ASC,Dense) //YYYYWW format
Last 12 weeks = CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Week Rank]>=max('Date'[Week Rank])-11 && 'Date'[Week Rank]<=max('Date'[Week Rank])))
Now use the field parameter on the renamed column of date table and change the measure as suggested in blog
selected parameter code is important
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
- Anonymous3 years agoNot applicable
Hi amitchandak ,
In the below calculation what is meant by [net] ?
CALCULATE([net] ,filter(Date, Date[Date] >= _min && Date[Date] <=_min))
- amitchandak3 years agoSuper User
Anonymous , here net is my measure. You can use your measure