Forum Discussion
passing date slicer value in calculated column
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.
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.
- halfglassdarkly4 years ago
Responsive Resident
Your Age measure still needs to be evaluated in a row level context for each value in TrusteeClaimsList_Case[LeadLagReceivedDate] (and any other fields eg Case ID from your TrusteeClaimsList_Case table that you want to report against).
You need to add a visual table with those fields and add your measure to that so that selectedvalue() has access to a single LeadLagRecievedDate per row to evaluate.