Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am trying to replicate the LOOKUP formula in Excel that will return the Reporting Period End date for a date that falls between the Reporting Period Start Date and Reporting Period End Date. This is a fairly simple calc, but I have no idea how to do this in DAX. LOOKUPVALUE is not what I am looking for as it doesn't do greater than or equal two, that I know of. Workbook is below.
Solved! Go to Solution.
This is the formula I was looking for:
=
CALCULATE
(
VALUES
(
XREF_ReportingPeriods[Reporting Period End]
),
FILTER
(
XREF_ReportingPeriods,
[Date] >= XREF_ReportingPeriods[Reporting Period Start]
&&
[Date] <= XREF_ReportingPeriods[Reporting Period End]
)
)
This is the formula I was looking for:
=
CALCULATE
(
VALUES
(
XREF_ReportingPeriods[Reporting Period End]
),
FILTER
(
XREF_ReportingPeriods,
[Date] >= XREF_ReportingPeriods[Reporting Period Start]
&&
[Date] <= XREF_ReportingPeriods[Reporting Period End]
)
)
end date in the period : =
IF (
HASONEVALUE ( Dates[Date] ),
MAXX (
FILTER (
Periods,
MAX ( Dates[Date] ) >= Periods[Reporting Period Start]
&& MIN ( Dates[Date] ) <= Periods[Reporting Period End]
),
Periods[Reporting Period End]
)
)
I have tried this, after changing all the table names to match mine, but I cannot get it to work (all the values are blank). I am adding it to a calculated column to Table_Historical.
I am looking to add this as a calculated column called Reporting Period End Dtate in Table_Historical. Do you know how I can do this, using the same names I have used?