Forum Discussion
LeeI
2 years agoFrequent Visitor
Creating A Calculated Field or Dax Measure for Hire date
I am struggling to come up with a way to Calculate a hire date with data from a table that I have been giving. Ultimately, I would like to be able to show the number of hires in a particular moment o...
- 2 years ago
No worries
Lets try a different approach.
Create a custom column in your tableHireDate = VAR _FirstRecord = CALCULATE ( MIN ( 'Table'[Column1]), FILTER ( 'Table', 'Table'[Name] = EARLIER ( 'Table'[Name] ) ) ) RETURN EOMONTH(_FirstRecord, -2) +1
Joe_Barry
Solution Sage
2 years agoNo worries
Lets try a different approach.
Create a custom column in your table
HireDate =
VAR _FirstRecord =
CALCULATE (
MIN ( 'Table'[Column1]),
FILTER (
'Table',
'Table'[Name] = EARLIER ( 'Table'[Name] )
)
)
RETURN
EOMONTH(_FirstRecord, -2) +1
LeeI
2 years agoFrequent Visitor
Hi Joe_Barry I believe that this accomplished exactly what I am looking for. Thank you for the prompt support! I do have a question for you though. It was my understanding that the calculate function has filters integrated into the function after the expression. In this particular example, why do you need to use the filter function within the calculate function. I guess what I am really asking, is do you know why the dax expression that I was using previously was not working?
Anyway, I will mark your answer as the accepted solution. Thanks again!