Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Community Members,
Since I am new to Power BI, I don't know much about it, though I am learning. I have a simple requirement where I need to use Power BI DAX to display the current working day number out of the overall working day number and that should appear dynamically every month.
For example, 2020 April month has a total of 22 working days. And suppose today is the 20th working day out of 22days. So in Power BI Report, I need to display it as 20 of 22 days. Furthermore, I need to display "As of April 28, 2020" above it (Using DAX only and this one should likewise alter dynamically). Refer to the screenshot link below:
Power-BI-Calculate-Working-Days-Dynamically
Can anyone please help me out to achieve this? Thanks in Advance!!
Hi @Preeti123
You could use the NETWORKDAYS function to do this.
Work Day =
VAR _Today = TODAY()
VAR _WorkDaysInMonth = NETWORKDAYS (EOMONTH (_Today, -1) + 1, EOMONTH (_Today, 0))
VAR _WorkDayToday = NETWORKDAYS (EOMONTH (_Today, -1) + 1, _Today)
VAR _Result = _WorkDayToday & " of " & _WorkDaysInMonth & " days"
RETURN
_Result
As Of Date =
VAR _Today = TODAY()
VAR _Result = "As of " & FORMAT(_Today, "mmmm d, yyyy")
RETURN
_Result
Note this uses the TODAY() function to get today's date. One extension yuou might want to do is base it on the last time the data was refreshed, rather than assume it's updated successfully today. You can use M function DateTime.LocalNow() in a new query in Power Query to get that.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |