Forum Discussion
Help with DAX Allexcept filtering
- 5 years ago
Your DAX expression was not written properly. ")" is not place right. It should be after the Item ID column.
You can review
It would depend on what is your requirements.
Do you want to be able filter on visual category and/or itemid to get the max date?
Adding the visual filter or slicer on canvas will work along with a change in your DAX to
CALCULATE(
MAX('Tracking'[Work Date])
)
or if you have additional columns
CALCULATE(
MAX('Tracking'[Work Date]),
ALLEXCEPT('Tracking','Tracking'[Item Id],'Tracking'[Category])
)
Is the requirement to always ignore the Category D?
again you can add in the line "ALLEXCEPT('Tracking','Tracking'[Item Id],'Tracking'[Category])" if you need to ignore filters on other columns.
Thanks
Paul
- nadmem5 years agoNew Member
Hi Paul,
Its not working. I had tried adding the category column to ALLEXCEPT before but it changes the behavior completely. Instead of max work date from entire category it just simply repeats the work date. I can send you the file or you can try it yourself. My requirement is to simply unselect category D from visual filter and then have the measure return max date from remainin categories i.e. after excluding Category D via visual filter, for Item 1, the maximum work date should be 3/1/2020 and for Item 2, the maximum work date should be 9/1/2020.