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.
My scenario is pretty simple: If the dates below fall within the same week, then "0", if not, then the number of DAYS between the two dates. Due Date is connected to my date table.
I have two dates for this that are relevant. Due Date & Projected Date
My current code only looks at if the dates are exactly the same. What I need is to determine whether they are just in the same Week or not. In the example below, March 01 and March 03 are within the same week, so the result should be "Yes".
Solved! Go to Solution.
Hi @Anonymous
Are you doing a DAX Calculated column or measure? Use WEEKNUM?
Is in same Week =
VAR CurDueWeek=WEEKNUM( 'Table'[Due Date])
VAR CurProjectedWeek=WEEKNUM('Table'[ProjectedDate])
RETURN
IF(CurDueWeek=CurProjectedWeek,"Yes","No")
I am using a column so it looks like this should work!
Hi @Anonymous
Are you doing a DAX Calculated column or measure? Use WEEKNUM?
Is in same Week =
VAR CurDueWeek=WEEKNUM( 'Table'[Due Date])
VAR CurProjectedWeek=WEEKNUM('Table'[ProjectedDate])
RETURN
IF(CurDueWeek=CurProjectedWeek,"Yes","No")
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |