Forum Discussion
ALLEXCEPT not ignoring filters
Anonymous
any cloud service like https://uploadfiles.io/
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,
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.
- Anonymous6 years agoNot applicable
az38
This still returns as blank. Is the measure you provided missing the variable? You created a variable but didn't use it.
Also, I want my selection to be the End Week, and not the Date because the data will be displayed on a graph showing JTD amounts by Week. - 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]) )) - v-alq-msft6 years ago
Community Support
Hi, Anonymous
Based on your description, you may create a calculated table with the following formula.
Test = DISTINCT('Table'[End Week])Then you may create a measure as below.
Result = CALCULATE( SUM('Table'[Amount]), FILTER( ALLSELECTED('Table'), 'Table'[Date]<=SELECTEDVALUE('Test'[End Week]) ) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
az38 & v-alq-msft
Thank you both! Once I created a seperate table to use as my selected dates and removed the relationship between them it works! 🙂