Forum Discussion
Help understanding measure
- Anonymous1 year ago
Hi, SBR1D
Thank you for your reply. ALL is used as a function to return a table when used in the Filter function.
The Values function returns a column without duplicate values.You may not have much impact on your results when using them in calculated columns, but they are usually used in measures and they play various roles.
Values can only be used as table functions. ALL can be used as both a filter and a table function. When we need to clear the filter in some cases, we usually put it in the second parameter of calculate.If you don't understand it, it's normal. I suggest you read the SQL BI article, which describes the differences and calculation logic in detail.
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI
Using ALLEXCEPT vs ALL + VALUES - SQLBI
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.
SBR1D ,
- Even in calculated columns, you might need to clear filters to ensure you're getting values from all rows, not just the current row context
- ALL('Activities'[LearnerID]) is more efficient as it only removes filters from one column
FILTER(ALL(Activities)) would remove filters from the entire table, which is unnecessary here
Using just the column is faster and uses less memory
// Less efficient
Latest = FILTER(ALL(Activities), condition)
// More efficient
Latest = FILTER(ALL(Activities[Column]), condition)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- SBR1D1 year agoHelper III
Thanks for your reply.
Why do we need to clear filters in learningplan? We want to filter the learnerid in Activities by the learnerid in LearningPlan.