Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Dear All,
I need help in writing a Dax measure using the date table with mutable IF conditions as below:
I need two measures :
1- (total days btween the date that I'll select in the silcer and the employee Hire Date + the Extra days / 365 ) now we will have the years of employment for each in a measure or a coulmn, now in other measure or the same one if the years >=18 I need to return 100% if it's >=15 return 75% if >=12 return 50% if >=9 return 25% other return 0
if the employee hire date is 01-01-2010 and the slicer date is 01-01-2023 he will have 13 years then he will be 50%, if the slicer date is 01-01-2027 he will have 17 Years then he will be 75%
2- the other measure is the easy one if we complete the above, it will take the years of employment * the Salary * the above mesure % 100% or 75% or 50% or 25%.
thank you for your help in advance
please find the below data to be used:
Name | Hire Date | Salary | Extra Days |
Name 1 | 6/1/2000 0:00 | 3000 | 0 |
Name 2 | 6/1/2000 0:00 | 2500 | 0 |
Name 3 | 6/1/2000 0:00 | 4000 | 0 |
Name 4 | 12/13/2010 0:00 | 2500 | 1065 |
Name 5 | 4/24/2011 0:00 | 2500 | 0 |
Name 6 | 4/28/2011 0:00 | 1500 | 0 |
Name 7 | 5/1/2011 0:00 | 4000 | 0 |
Name 8 | 5/24/2011 0:00 | 3500 | 1840 |
Name 9 | 6/7/2011 0:00 | 700 | 0 |
Name 10 | 7/3/2011 0:00 | 800 | 0 |
Name 11 | 7/10/2011 0:00 | 1200 | 0 |
Name 12 | 8/1/2011 0:00 | 500 | 1640 |
Name 13 | 9/11/2011 0:00 | 950 | 0 |
Name 14 | 10/4/2011 0:00 | 1800 | 0 |
Name 15 | 5/4/2014 0:00 | 1400 | 0 |
Name 16 | 6/10/2014 0:00 | 1660 | 0 |
Name 17 | 5/8/2016 0:00 | 5890 | 0 |
Name 18 | 5/22/2016 0:00 | 650 | 0 |
Name 19 | 5/23/2016 0:00 | 850 | 0 |
Name 20 | 6/1/2016 0:00 | 954 | 0 |
Name 21 | 6/12/2016 0:00 | 3650 | 0 |
Name 22 | 7/12/2016 0:00 | 800 | 0 |
Name 23 | 7/17/2016 0:00 | 900 | 0 |
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
60 | |
57 |