Forum Discussion
setis
6 years agoPost Partisan
Ignoring a filter
Dear experts, I am trying to create a measure to show me the sales amount per month for all years except 2009 (in my real project will be "current year" but for this excercise this can work) My ...
amitchandak
6 years agoSuper User
Try
Sales NO CY =
var _year = SELECTEDVALUE('Date'[Year])
return
CALCULATE (
COUNTROWS ( Sales ),ALL('Date'[Year]),not('Date'[Year] =_year)
)Anonymous
6 years agoNot applicable
try the above - failing that, is this what you're looking for?
- setis6 years agoPost Partisan
Dear amitchandak and Anonymous ,
Thanks a lot for your answers. The solution proposed by amitchandak works perfectly in the example, but I must be doing something wrong in my real project, since I'm still getting blanks.
This is my measure:
# Cases Forecast-NotCY = VAR Year_selected = SELECTEDVALUE ( 'Date'[Calendar Year] ) RETURN CALCULATE ( AVERAGEX ( VALUES ( 'Date'[Date] ); CALCULATE ( [# Cases]; ALL ( 'Date'[Calendar Year] ); NOT ( 'Date'[Calendar Year] = Year_selected ) ) ) )My #Cases measure is just a DISTINTCOUNT for Cases ID.
would you be able to see why this isn't working for me here?
- amitchandak6 years agoSuper User
Are you trying to get Avg no cases per day ??
- amitchandak6 years agoSuper User
then try something like that
Avg Sales NO Day = var _year = SELECTEDVALUE('Date'[Year]) return CALCULATE ( Sales[# Sales],ALL('Date'[Year]),not('Date'[Year] =_year) )/CALCULATE ( count('Date'[Date]),ALL('Date'[Year]),not('Date'[Year] =_year) )