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
Hi,
In this table ('Random prices'), I use the 'Previous month' measure and I would like to get the price from Jan 3, which is blank. It gives me the price from Jan 5, but I want to give me the price from Jan 2.
The measures I use are:
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please try something like below.
Previous month =
VAR _latestdate =
MAX ( 'Random prices'[Date] )
VAR _prevmonthlatestdate =
MAXX (
FILTER (
'Random prices',
'Random prices'[Date] <= EOMONTH ( _latestdate, -1 )
&& DAY ( 'Random prices'[Date] ) <= DAY ( _latestdate )
),
'Random prices'[Date]
)
RETURN
CALCULATE ( [Latest price], 'Random prices'[Date] = _prevmonthlatestdate )
Hi,
I am not sure how your datamodel looks like, but please try something like below.
Previous month =
VAR _latestdate =
MAX ( 'Random prices'[Date] )
VAR _prevmonthlatestdate =
MAXX (
FILTER (
'Random prices',
'Random prices'[Date] <= EOMONTH ( _latestdate, -1 )
&& DAY ( 'Random prices'[Date] ) <= DAY ( _latestdate )
),
'Random prices'[Date]
)
RETURN
CALCULATE ( [Latest price], 'Random prices'[Date] = _prevmonthlatestdate )
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!