Forum Discussion
ALLEXCEPT not ignoring filters
Anonymous
could you show the data example?
- az386 years ago
Community Champion
Anonymous
any cloud service like https://uploadfiles.io/
- Anonymous6 years agoNot applicable
az38
Apologies, I wasn't able to get the upload to work. Possibly due to working from home.
Here's the sample table I created:Project Date End Week Amount
123450 Friday, January 3, 2020 Saturday, January 4, 2020 5 123450 Wednesday, April 1, 2020 Saturday, April 4, 2020 8 123450 Wednesday, December 4, 2019 Saturday, December 7, 2019 78 234500 Wednesday, February 5, 2020 Saturday, February 8, 2020 99 234500 Sunday, March 8, 2020 Saturday, March 14, 2020 10 234500 Thursday, January 2, 2020 Saturday, January 4, 2020 64 156700 Thursday, January 2, 2020 Saturday, January 4, 2020 87
The End Week column is just the ending date of the week which corresponds to the Date (transaction date).
I was able to replicate the issue pretty easily with this data.
When I add the measure,CALCULATE(SUM('Table'[Amount]), ALLEXCEPT('Table', 'Table'[Project]), FILTER(ALL('Table'), 'Table'[Date]<=SELECTEDVALUE('Table'[End Week])))and then select an End Week in the slicer, it works perfectly.
I selected Feb 8th and the total was 333, which is the sum of all amounts before or equal to Feb 8th.
To test the Project filter issue, I selected Project 123450. With Feb 8th still as the selected End Week, I want it to return a value of 83 (all data before the date of Feb 8th), but instead it returns blank.
Apologies again, hopefully this works for you.- az386 years ago
Community Champion
Anonymous
ok, I got it
first, create a calendar table
CalendarTable = CALENDAR(MIN('Table'[Date]), MAX('Table'[End Week]))then use as CalendarTable[Date] field as date slicer and create a measure in your table
Measure = var _endDate = CALCULATE(MAX('CalendarTable'[Date]),ALLSELECTED('Table'[End Week])) RETURN CALCULATE(SUM('Table'[Amount]),FILTER(ALLEXCEPT('Table','Table'[Project]),'Table'[Date]<=SELECTEDVALUE(CalendarTable[Date]) ))