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
Solved! Go to Solution.
Hi @ryan_mayu ,
Thanks for your quick response.
Hi @Anonymous ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
VAR _1 =
CALCULATE (
MAX ( 'table1'[date] ),
FILTER (
ALL ( table1 ),
table1[weekday] = 5
&& table1[date] < SELECTEDVALUE ( table1[date] )
)
)
VAR _2 =
CALCULATE (
MAX ( table1[date] ),
FILTER ( ALL ( table1 ), table1[date] < SELECTEDVALUE ( table1[date] ) )
)
VAR _3 =
CALCULATE (
MAX ( table1[value] ),
FILTER ( ALL ( table1 ), table1[date] = _2 )
)
RETURN
IF (
MAX ( table1[weekday] ) <= 5,
_3,
IF (
MAX ( table1[weekday] ) >= 6,
CALCULATE (
MAX ( table1[value] ),
FILTER ( ALL ( table1 ), table1[date] = _1 )
)
)
)
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ryan_mayu ,
Thanks for your quick response.
Hi @Anonymous ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
VAR _1 =
CALCULATE (
MAX ( 'table1'[date] ),
FILTER (
ALL ( table1 ),
table1[weekday] = 5
&& table1[date] < SELECTEDVALUE ( table1[date] )
)
)
VAR _2 =
CALCULATE (
MAX ( table1[date] ),
FILTER ( ALL ( table1 ), table1[date] < SELECTEDVALUE ( table1[date] ) )
)
VAR _3 =
CALCULATE (
MAX ( table1[value] ),
FILTER ( ALL ( table1 ), table1[date] = _2 )
)
RETURN
IF (
MAX ( table1[weekday] ) <= 5,
_3,
IF (
MAX ( table1[weekday] ) >= 6,
CALCULATE (
MAX ( table1[value] ),
FILTER ( ALL ( table1 ), table1[date] = _1 )
)
)
)
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
could you pls provide some sample data and expected output?
Proud to be a Super User!
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!