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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Here's the basic problem I'm trying to solve.
Some song is to be performed at some upcoming date, I and I want to calculate the previous date the song was performed. I came up with a simple plan. Get the most recent performance of the song with MAX([date]) and then calculate a new Max([date]) on a set where the first value has been filtered out.
SecondMostRecentPerformanceDate =
Var MaxPlanDate = CALCULATE(Max(Plans[PlanDate]), All(Plans[PlanDate]))
Return
CALCULATE(
MAX( Plans[PlanDate] )
,Plans[PlanDate] < MaxPlanDate
)
Although I've confirmed that MaxPlanDate has the expected value, the CALCULATE() function is returning blanks. What am I missing here?
@Anonymous,
I create a measure using your DAX formula, and it returns expected result.
Regards,
Lydia
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!