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
Aliafshari
8 years agoFrequent Visitor
Thank you Zubair_Muhammad
Aliafshari
8 years agoFrequent Visitor
Sorry Zubair_Muhammad
One more question, Consider we add a column name as Main account, how to sum before a day for each of main account in a table?
Date Main account Quantity
** ** **
- Zubair_Muhammad8 years agoCommunity Champion
HI Aliafshari
In that case use this MEASURE. Then drag it to the TABLE visual along with the account names
Sum_Before_Selected_Day = CALCULATE ( SUM ( TableName[Quantity] ), FILTER ( ALLEXCEPT ( TableName, TableName[Main Account] ), TableName[Date] < SELECTEDVALUE ( TableName[Date] ) ) )- Zubair_Muhammad8 years agoCommunity Champion
- Aliafshari8 years agoFrequent Visitor
Thanks for the swift reply!