Forum Discussion
Anonymous
4 years agoNot applicable
Select 1 date and take 2 weeks
Hi, I have this meassure: Week Start Date = BASE1415[FinActTran]-WEEKDAY(BASE1415[FinActTran],2) +1 that is generating the start week date from a specific date for example for example Jun 6, 202...
- 4 years ago
Hi, Anonymous ;
You could create a flag measure as follows:
flag = IF ( DATEDIFF ( MAX ( 'Date'[Date] ), MAX ( 'Table'[Date] ), WEEK ) = 0 && MAX ( 'Table'[Date] ) >= MAX ( 'Date'[Date] ), 1, IF ( DATEDIFF ( MAX ( 'Date'[Date] ), MAX ( 'Table'[Date] ), WEEK ) = 1 && WEEKDAY ( MAX ( 'Table'[Date] ), 1 ) <= WEEKDAY ( MAX ( 'Date'[Date] ), 1 ), 1, 0 ) )The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
4 years agoHi, Anonymous ;
You could create a flag measure as follows:
flag =
IF (
DATEDIFF ( MAX ( 'Date'[Date] ), MAX ( 'Table'[Date] ), WEEK ) = 0
&& MAX ( 'Table'[Date] ) >= MAX ( 'Date'[Date] ),
1,
IF (
DATEDIFF ( MAX ( 'Date'[Date] ), MAX ( 'Table'[Date] ), WEEK ) = 1
&& WEEKDAY ( MAX ( 'Table'[Date] ), 1 ) <= WEEKDAY ( MAX ( 'Date'[Date] ), 1 ),
1,
0
)
)
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.