• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Use of ALL in calculated column

Skippo

New Member
Hi All

I've been going up the wall with trying to understand this concept in the last few days.

This is a calculated column and there are two tables, LearningPlan (1) and Activities (Many)

I understand how ALL works to remove filters in a visual but in a calculated column i'm lost.
I know that context transition introduces a filter context for the current row but don't we want to keep that context so we can find id's from the current row in the Activities table?

It seems like thats what is happening anyway except at first we remove the filters, only to put them back on.

What filters could be applied in at table level?

Code:
CALCULATE(
MAX(Activities[Submission date]) ,
FILTER ( ALL ( 'Activities'[LearnerID]) ,
 'Activities'[LearnerID] = LearningPlan[LearnerID])
)
 
Typically speaking. You don't perform this sort of calculation in DAX column.

What's your end goal?
 
Typically speaking. You don't perform this sort of calculation in DAX column.

What's your end goal?

Just want to get the max submission date from the activities table. My predecessor had written the code in my OP and i've been confused since i saw it. I can't visualise why you would need to remove the filter on Activities[LearnerId] and then reapply it.
 
In calculated columns, everything is evaluated based on row context.
I'm assuming there's relationship between the table. Though without knowing your data set, and model. Bit hard for me to give you exact answer.

Personally, I'd do this sort of calculation in DAX measure. But it will depend on use case.
 
In calculated columns, everything is evaluated based on row context.
I'm assuming there's relationship between the table. Though without knowing your data set, and model. Bit hard for me to give you exact answer.

Personally, I'd do this sort of calculation in DAX measure. But it will depend on use case.

The relationship is LearningPlan (1) > Activities(Many) LearnerID being the link

Yea i remade it as a measure as it makes more sense to me that way. Still a bit confused as to the below from an earlier post.

" can't visualise why you would need to remove the filter on Activities[LearnerId] and then reapply it."
 
Back
Top