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 Power Bi community
I have three tables a
A. A Calender table and a table that shows all the dates. [Calender]
B. A table that shows all users [users]
C. A table that shows all time registations. [registrations]
I use this DAX code to show how much each employee should work each week.
But I don't want to include employees after they are no longer employed.
In the user table I have a column that shows the deactivation dates. I don't want to count dates after the users deactivation date. Any idea on how this could be solved?
All help will be greatly appreciated.
Hi,
Share an MS Excel file with the 3 tables and on another tab show the expected result. Show your formulas/Pivot Tables so that i can translate those formulas/ogic into the DAX language.
Hi @ThomasWeppler ,
Before counting, you can filter the date table to get a new date table before the deactivation date. Therefore, the expression can be modified to:
Total Normeret =
var new_date =
FILTER(
'Calender',
'Calender'[Date] <= MAX('All Users'[DeactivationDate])
)
VAR _countmonday = CALCULATE(COUNT(new_date[Date]),new_date[weekday] = 1)
…
For detailed information about the filter function, please refer to the documentation: FILTER function (DAX) - DAX | Microsoft Learn.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the answer @Anonymous
It sounds like the right solution. However when I try it I get the following error message.
The expression refers to multiple columns. It is not possible to convert multiple columns to a scalar value.
I did a bit of googleling and looked around on the forum, but I am not sure how to proceed from here.
Do you know how I solve it?
Hi @ThomasWeppler ,
I wonder if you would like to hide your sensitive data, or create representative data according to your needs, and then share the pbix file with me. You can also share representative screenshots or data to better help you solve the problem.
@Anonymous sure
let us say the user with name 1 doesn't work for the comany any longer. the normeret time should be zero
and let us say that the user with name 5 stoped working in the middle of the time defined by the calender slicer the normeret time should be half.
I hope this help.
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!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 48 | |
| 46 |