Forum Discussion
frostys
Helper I
8 years agoTime Slicer
Hi ! I put a time slicer in a report : The data come directly from a "date" column. I try to make an automatic selection for the current year and current month selected. (Exempl...
frostys
Helper I
8 years agoI change some syntax who were not working, so this is the syntax who work
date2 =
IF (
HASONEVALUE ( 'Data input'[Date].[Month] );
CALCULATE (
DATESBETWEEN (
'Data input'[Date].[Date];
DATE ( YEAR ( MAX ( 'Data input'[Date].[Date] ) ); 1; 1 );
EOMONTH ( MAX ( 'Data input'[Date].[Date] ); -1 )
)
)
)
Otherwise, is is not accept this measure as slicer
Anonymous
8 years agoNot applicable
So does the measure work for your needs?
The reason you had to make the changes are two fold
1. You are in a different region hence the , vs ;
2. You do not have a datetable linked to your data table hence having to use the inbuilt datetable.