Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need to be able to say the outcome recorded for the max date within the reporting period. The max date sits on 1 table and the outcome on another table.
I have the max date:
var _enddatecontext=MAX('transform DimCalendar'[ActualDate])
Return
CALCULATE(
MAX('dl FactCATServiceReview'[CATServiceReviewReviewDate])
,FILTER('dl FactCATServiceReview',
('dl FactCATServiceReview'[CATServiceReviewReviewDate]<=_enddatecontext)))
But then I need to say look at the related table and return the status text.
Linking column [AccommodationStatusID]
Table: dl_DimCATReviewAccommodationStatus
Column: [CATReviewAccommodationStatusText]
Solved! Go to Solution.
SOLVED.
I merged the tables to exclude the related table look-up problem.
Then turned the calculation into a variable.
DRAFT Accomodation End =
var _enddatecontext=MAX('transform DimCalendar'[ActualDate])
var _MaxDate=CALCULATE(MAX('dl FactCATServiceReview'[CATServiceReviewReviewDate]),FILTER('dl FactCATServiceReview','dl FactCATServiceReview'[CATServiceReviewReviewDate]<=_enddatecontext))
var _Result=
CALCULATE(MAX('dl FactCATServiceReview'[AccommodationSituation]),'dl FactCATServiceReview'[CATServiceReviewReviewDate]=_MaxDate)
RETURN
_Result
SOLVED.
I merged the tables to exclude the related table look-up problem.
Then turned the calculation into a variable.
DRAFT Accomodation End =
var _enddatecontext=MAX('transform DimCalendar'[ActualDate])
var _MaxDate=CALCULATE(MAX('dl FactCATServiceReview'[CATServiceReviewReviewDate]),FILTER('dl FactCATServiceReview','dl FactCATServiceReview'[CATServiceReviewReviewDate]<=_enddatecontext))
var _Result=
CALCULATE(MAX('dl FactCATServiceReview'[AccommodationSituation]),'dl FactCATServiceReview'[CATServiceReviewReviewDate]=_MaxDate)
RETURN
_Result
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
78 | |
65 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |