Forum Discussion
Time Slicer
So the way I would do this is through changing the measure you are using for the visuals.
something like this should work, when a single month is selected it will calculate the specificd measure from the start of the calendar year to the previous month.
Measure =
IF (
HASONEVALUE ( DateTable[Month] ),
CALCULATE (
[Measure],
DATESBETWEEN (
DateTable[Date],
DATE ( YEAR ( MAX ( DateTable[Date] ) ), 1, 1 ),
EOMONTH ( MAX ( DateTable[Date] ), -1 )
)
)
)
I 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
- Anonymous8 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.
- Anonymous8 years agoNot applicable
HI frostys,
Current power bi not support to create dynamic calculated column/table based on slicer/filter.
In addition, measure is possible to dynamic change based on slicer/filter, but power bi not support to use as source of slicer or axis of visual.
Regards,
Xiaoxin Sheng