Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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")
User | Count |
---|---|
73 | |
70 | |
38 | |
23 | |
23 |
User | Count |
---|---|
96 | |
94 | |
50 | |
42 | |
40 |