Forum Discussion
passing date slicer value in calculated column
Try using selectedvalue(TrusteeClaimsList_Received[LeadLagReceivedDate])
when referring to your column names.
You will still need to use the measure in a visual table or other visual where it can inherit row level context from your other fields.
https://docs.microsoft.com/en-us/dax/best-practices/dax-selectedvalue
- Anonymous4 years agoNot applicable
I tried and nothing shows,
It should take 30/9/2021 as my [End of Period] and filter accordingly, but no data shows
- halfglassdarkly4 years ago
Responsive Resident
It's not going to work on its own because it needs the context from the columns it's referencing - they need to be added to your visual table as well.
- Anonymous4 years agoNot applicable
Not sure what that means ?
Here,[ End of Period] is a measure
[End of Period] = calculate(max('Date Table'[Date]),AllSelected('Date Table'))
And I am using that measure in another measure
Age = IF(SELECTEDVALUE(TrusteeClaimsList_Case[LeadLagReceivedDate]) <> BLANK()
&& ISBLANK(SELECTEDVALUE(TrusteeClaimsList_Case[LeadLagReceivedDate])),
DATEDIFF(SELECTEDVALUE(TrusteeClaimsList_Case[LeadLagReceivedDate]),[End of Period],DAY),BLANK())
And, in my visual page I filtered the page with my date column and it should take max of the date selection(i.e, 30/9/2021 and filter the results.