Forum Discussion
Anonymous
8 years agoNot applicable
set a default value on a slicer
Hello, From reading im pretty sure the answer to this is "no". But some of the questions re this are dated, so Im hoping we have moved forward since. I have a slicer for Fiscal period. ...
- 8 years ago
Hi Anonymous,
In my test, I created a DimDate table which has no relationship with actual data table. In DimDate table, create a Month column which will be added to slicer later.
Then, apply filter to measures. Suppose the original measure is like:
Invoiced to date = SUM('Fiscal Sales'[Amount])
Please adjust it to:
Invoiced to date = IF ( HASONEFILTER ( DimDate[Month] ), CALCULATE ( SUM ( 'Fiscal Sales'[Amount] ), FILTER ( 'Fiscal Sales', 'Fiscal Sales'[Date].[MonthNo] = MAX ( DimDate[Month] ) ) ), CALCULATE ( SUM ( 'Fiscal Sales'[Amount] ), FILTER ( 'Fiscal Sales', 'Fiscal Sales'[Date].[MonthNo] = MONTH ( TODAY () ) ) ) )
Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
8 years agoHi Anonymous,
In my test, I created a DimDate table which has no relationship with actual data table. In DimDate table, create a Month column which will be added to slicer later.
Then, apply filter to measures. Suppose the original measure is like:
Invoiced to date = SUM('Fiscal Sales'[Amount])
Please adjust it to:
Invoiced to date = IF ( HASONEFILTER ( DimDate[Month] ), CALCULATE ( SUM ( 'Fiscal Sales'[Amount] ), FILTER ( 'Fiscal Sales', 'Fiscal Sales'[Date].[MonthNo] = MAX ( DimDate[Month] ) ) ), CALCULATE ( SUM ( 'Fiscal Sales'[Amount] ), FILTER ( 'Fiscal Sales', 'Fiscal Sales'[Date].[MonthNo] = MONTH ( TODAY () ) ) ) )
Best regards,
Yuliana Gu