Forum Discussion
Default YTD
- Anonymous2 years ago
LeandroDeodato Thanks for your contribution on this thread.
Hi powerbiexpert22 ,
You can follow the steps below to get it, please find the details in the attachment.
1. Create a measure as below
IsSlicerFiltered = VAR _year = SELECTEDVALUE ( 'Date'[Year] ) VAR _month = SELECTEDVALUE ( 'Date'[MonthNo] ) RETURN IF ( ISFILTERED ( 'Date'[Date] ), 1, IF ( _year = YEAR ( TODAY () ) && _month >= 1 && _month <= MONTH ( TODAY () ), 1, 0 ) )2. Apply the visual-level filter with the condition(IsSlicerFiltered is 1) on the line chart
Best Regards
i am able to acheive it by creating calculated column, the problem is it is very difficult for user to navigate from year 9999 using calendar as shown in last screenshot
LeandroDeodato Thanks for your contribution on this thread.
Hi powerbiexpert22 ,
You can follow the steps below to get it, please find the details in the attachment.
1. Create a measure as below
IsSlicerFiltered =
VAR _year =
SELECTEDVALUE ( 'Date'[Year] )
VAR _month =
SELECTEDVALUE ( 'Date'[MonthNo] )
RETURN
IF (
ISFILTERED ( 'Date'[Date] ),
1,
IF (
_year = YEAR ( TODAY () )
&& _month >= 1
&& _month <= MONTH ( TODAY () ),
1,
0
)
)
2. Apply the visual-level filter with the condition(IsSlicerFiltered is 1) on the line chart
Best Regards
- Sergii242 years agoSuper User
Great solution!
- powerbiexpert222 years agoImpactful Individual
yes, this is great solution, thanks Anonymous