- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to write a Dax measure using the date table with mutable IF conditions
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 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-06-2024 03:26 PM | |||
03-14-2024 09:24 AM | |||
01-02-2020 11:53 AM | |||
03-18-2021 01:52 AM | |||
03-18-2024 08:45 AM |
User | Count |
---|---|
141 | |
115 | |
84 | |
63 | |
48 |