Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
I am basically trying to get working days to date, but if it's current month, i need it to show working days till yesterday (exclude today).
I am trying to use the below formula, but the bolded part gives me an error saying a single value cannot be determined (The Data File is basically when employees submit something everyday, so there are multiple of each dates):
Working days to date =
Solved! Go to Solution.
Hey @Anonymous ,
How about this?
Working days to date =
VAR a = CALCULATE(SUM('Date Table'[Workday]),MONTH('DataFile'[Date])=MONTH(TODAY()),KEEPFILTERS('Date Table'[Date]<=TODAY()))
VAR b = SELECTEDVALUE('DataFile'[Date])
RETURN
IF(MONTH(b)=MONTH(TODAY()),a-1,a)
Proud to be a Super User!
Hi @Anonymous ,
You can modify the formula as follows and add a max:
IF(
MONTH(MAX('DataFile'[Date])) = MONTH(TODAY()),
CALCULATE(
SUM('Date Table'[Work day]),
KEEPFILTERS('Date Table'[Date]<= TODAY())
) -1,
CALCULATE(
SUM('Date Table'[Work day]),
KEEPFILTERS('Date Table'[Date]<= TODAY())
)
)
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.
Hey @Anonymous ,
How about this?
Working days to date =
VAR a = CALCULATE(SUM('Date Table'[Workday]),MONTH('DataFile'[Date])=MONTH(TODAY()),KEEPFILTERS('Date Table'[Date]<=TODAY()))
VAR b = SELECTEDVALUE('DataFile'[Date])
RETURN
IF(MONTH(b)=MONTH(TODAY()),a-1,a)
Proud to be a Super User!
This worked, thank you!!!
This works for current month, but when i filter to previous month, it wont work 😞 i have a card to show this formula, and it remains the same regardless of whta I select in the month slicer.
Can you give an example of what the result should look like?
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!