Forum Discussion
carlottaf
5 years agoFrequent Visitor
Use SELECTEDVALUE in a measure
Hi everyone! I have a table showing Sales by Client and I am trying to filter it by Year, Month. I also have to put in this table the same sale measure calculated on a different period that is ch...
amitchandak
Super User
5 years agocarlottaf , Are you selecting any value from the slicer?
Try like
Selected_Year = maxx(allselected(Calendar), Calendar[Year)
Then
Sales =
Var Calendar_Year = [Selected_Year]
Return
CALCULATE(SUM('Documento-Riga'[Netto riga]),
FILTER('Documento-Riga', YEAR('Documento-Riga'[Data]) = Calendar_Year),
)
carlottaf
5 years agoFrequent Visitor
I am selecting only one Year in the slicer, 2021.