Forum Discussion
Newbie with a problem understanding code.
- Anonymous2 years ago
Hi, peraleonardo
Thank you very much for your reply. This is true if you intend to take all dates into account in your calculations without taking into account any filters applied elsewhere in the report.
ALL ( 'table'[date])However, if you wish to keep some filters, you may need to adjust this part of the formula. You should try using ALLEXCEPT to keep the other filters in your matrix.
ALLEXCEPT function (DAX) - DAX | Microsoft Learn
KEEPFILTERS function (DAX) - DAX | Microsoft Learn
It would be helpful if you could make some virtual data and describe the output that you are looking forward to, it would help me understand your problem.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Understood but I also have another consideration. When I try to modify the second condition and insert:
'table'[date] <= MAX(DATE(yyyy,mm,dd)) I always get in the matrix the maximum date like if the filter apply by the matrix itself it's not working.
how can you help me out with this?
Hi, peraleonardo
Thank you very much for your reply. This is true if you intend to take all dates into account in your calculations without taking into account any filters applied elsewhere in the report.
ALL ( 'table'[date])
However, if you wish to keep some filters, you may need to adjust this part of the formula. You should try using ALLEXCEPT to keep the other filters in your matrix.
ALLEXCEPT function (DAX) - DAX | Microsoft Learn
KEEPFILTERS function (DAX) - DAX | Microsoft Learn
It would be helpful if you could make some virtual data and describe the output that you are looking forward to, it would help me understand your problem.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.