Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I have two date columns in Power BI. One states the first day of a work contract, the second the end date. My boss wants to know how many contracts were 'active' in year 2017. And how many in 2018, etc. The idea is to make a slicer.
I thought I'd create new columns, called 'Working in 2017' and so on. I'm looking for a query or Dax function that will retrun a Yes (or 1) or No (or 0). So someone who started working on 1-1-2018 and will stop midway 2019, will get a No at 'Working in 2017' and a Yes at 'Working in 2018' and 'Working in 2019'.
Hoping someone can and will help me. Thanks!
Solved! Go to Solution.
=IF(AND([Start Contract]>=DATE(2017,1,1),[End Contract]>=DATE(2017,12,31),1,0)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |