Forum Discussion
Dynamic X axis range based on the current Month
- Anonymous1 year ago
Hi Steamedbunz ,
Try applying the following measure to a visual filter:
MEASURE = VAR __today = TODAY () VAR __cur_date = SELECTEDVALUE ( 'Table'[Date] ) VAR __wk_monthstart = CALCULATE ( MAX ( 'Table'[WK MonthStart] ), 'Table'[Date] = __today ) VAR __wk_monthend = CALCULATE ( MAX ( 'Table'[WK MonthEnd] ), 'Table'[Date] = __today ) VAR __filter = IF ( __cur_date >= __wk_monthstart && __cur_date <= __wk_monthend, 1 ) RETURN __filterBest 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 in the Power BI Forum
Hi Steamedbunz ,
Try applying the following measure to a visual filter:
MEASURE =
VAR __today =
TODAY ()
VAR __cur_date =
SELECTEDVALUE ( 'Table'[Date] )
VAR __wk_monthstart =
CALCULATE ( MAX ( 'Table'[WK MonthStart] ), 'Table'[Date] = __today )
VAR __wk_monthend =
CALCULATE ( MAX ( 'Table'[WK MonthEnd] ), 'Table'[Date] = __today )
VAR __filter =
IF ( __cur_date >= __wk_monthstart && __cur_date <= __wk_monthend, 1 )
RETURN
__filter
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 in the Power BI Forum