Forum Discussion
Aliafshari
8 years agoFrequent Visitor
sum before a day
Hi everyone! Assume that I have selected Year, Month and Day in slicer in below tale, I would like to sum the Quantity before the selected time dimension, How could I do that? Date ...
- 8 years ago
Hi Aliafshari
When you select a YEAR, a MONTH and a DAY, result would be a single date
SELECTEDVALUE pulls that date
see the attached file with your sample data
Zubair_Muhammad
Community Champion
8 years agoHi Aliafshari
Try this MEASURE
Sum_Before_Selected_Day =
CALCULATE (
SUM ( TableName[Quantity] ),
FILTER (
ALL ( TableName ),
TableName[Date] < SELECTEDVALUE ( TableName[Date] )
)
)- Aliafshari8 years agoFrequent Visitor
Thanks for youre notice, Youre measure only depend on Date but I really want to first select Year, month and then day, how to add this filters in youre measure?
- Zubair_Muhammad8 years ago
Community Champion
Hi Aliafshari
When you select a YEAR, a MONTH and a DAY, result would be a single date
SELECTEDVALUE pulls that date
see the attached file with your sample data
- Aliafshari8 years agoFrequent Visitor
Thank you Zubair_Muhammad