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.
I have Table EmploymentDetails I will mention the importent columns
as You shown above I tired to create column to calculate Years of Service
"
could anyone help me to create a column and Measure please ?
Solved! Go to Solution.
Hi @amal_01
Try using this dax formula :
Hi @amal_01
Try using this dax formula :
Hi @amal_01 ,
If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
Hi @amal_01
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!
Thank you!
@amal_01 If I understand, you can just use MAX('Dates'[Date]) in place of TODAY(). Basically, get the last date selected by your slicer.
Hi @Greg_Deckler
thanks for response ,
but i Used MAX('EmploymentDetails'[EmploymentStartDate]) Does not work correctly ,
the employees are filtered by the slicer depande on thire EmploymentStartDate
but the Years of Service are not calculated based on slicer
For Exp:
as you shown here
the employee 12564 his EmploymentStartDate on 12/6/2020 and slicer is on 5/19/2022 so it sould be his Years of Service 1 year and 3 month not 4 Years
@amal_01 OK, first question is what is the Slicer based on? Is it a Dates table or is it some date column in the EmployementDetails table? If it is a Dates table, is that Dates table related to the EmploymentDetails table? It's impossible to answer the question reliably without some basic details.
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Hi @amal_01
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!
Thank you!
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 |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |