March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
In my powerbi report, I am trying to flag as the latest working day as 1 and other days as 0.
Working Days are (Monday -> Friday)
Attached is a sample example of what I am trying to achieve.
Please help - thanks.
Solved! Go to Solution.
Hi @mo1988 ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _today=TODAY()
var _week=WEEKDAY(MAX('Date'[Date]),2)
return
MAXX(
FILTER(ALL('Date'),
'Date'[Date]<_today&&NOT( _week) in {6,7}),'Date'[Date])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @mo1988 ,
Here are the steps you can follow:
1. Create measure.
Measure =
var _today=TODAY()
var _week=WEEKDAY(MAX('Date'[Date]),2)
return
MAXX(
FILTER(ALL('Date'),
'Date'[Date]<_today&&NOT( _week) in {6,7}),'Date'[Date])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@mo1988 ,
maxx(filter(allselected(Date), date[Date] < date[Date] && weeknum(Date[Date],2) <6) , Date[Date])
Also, check
Power BI Workday vs Last Workday- https://youtu.be/MkYLT_GYIbM
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
77 | |
59 | |
55 | |
42 |
User | Count |
---|---|
184 | |
106 | |
84 | |
59 | |
48 |