Forum Discussion
Date ranges
- Anonymous4 years ago
Hi Aryaja96 ,
Please create these.
Table.
Table = DISTINCT ( SELECTCOLUMNS ( CALENDAR ( MIN ( 'Calendar'[Date] ), MAX ( 'Calendar'[Date] ) ), "Start", WEEKNUM ( [Date], 2 ), "End", WEEKNUM ( [Date], 2 ) + 1 ) )Calculated column.
Column = [Start] & " to " & [End] & " Week"Measure.
Measure = VAR _weeknum = MAX('Calendar'[Week of Year]) VAR _start = MAX('Table'[Start]) VAR _end = MAX('Table'[End]) VAR _result = IF(_weeknum>=_start&&_weeknum<=_end,1) RETURN _resultConfigure filters.
Attached PBIX file for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi Aryaja96 ,
Please create these.
Table.
Table =
DISTINCT (
SELECTCOLUMNS (
CALENDAR ( MIN ( 'Calendar'[Date] ), MAX ( 'Calendar'[Date] ) ),
"Start", WEEKNUM ( [Date], 2 ),
"End", WEEKNUM ( [Date], 2 ) + 1
)
)
Calculated column.
Column = [Start] & " to " & [End] & " Week"
Measure.
Measure =
VAR _weeknum = MAX('Calendar'[Week of Year])
VAR _start = MAX('Table'[Start])
VAR _end = MAX('Table'[End])
VAR _result = IF(_weeknum>=_start&&_weeknum<=_end,1)
RETURN
_result
Configure filters.
Attached PBIX file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
hey Anonymous that totally worked! thank you for the help!