Forum Discussion
Latest File Date by default whenever we open the report
- 6 years ago
Hi Anonymous
If whenever you open the file, the date slicer isn't selected, then you could create a measure as below:
max date = MAX(Sheet6[date]) max date's value = VAR maxfiledate = CALCULATE ( MAX ( Sheet6[date] ), ALL ( Sheet6 ) ) VAR maxvalue1 = CALCULATE ( SUM ( Sheet6[values] ), FILTER ( Sheet6, Sheet6[date] = maxfiledate ) ) VAR maxselected = CALCULATE ( MAX ( Sheet6[date] ), ALLSELECTED ( Sheet6 ) ) VAR maxvalue2 = CALCULATE ( SUM ( Sheet6[values] ), FILTER ( Sheet6, Sheet6[date] = maxselected ) ) RETURN IF ( ISFILTERED ( 'date'[Date] ), maxvalue2, maxvalue1 )If your case includes the scenario below:
You open the file yesterday, change the date slicer to a centain date point, then close,
Today, you open the file, its date slicer is filtered upon the file open.
In this way, my measure doesn't work as expected.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Is it Possible to have Latest File Date while opening the Report? And leter on once we opened the Report if we select calendar filter then the data should get reflected based on calendar selection?
Thanks in Advance.
Hi Anonymous
If whenever you open the file, the date slicer isn't selected, then you could create a measure as below:
max date = MAX(Sheet6[date])
max date's value =
VAR maxfiledate =
CALCULATE ( MAX ( Sheet6[date] ), ALL ( Sheet6 ) )
VAR maxvalue1 =
CALCULATE (
SUM ( Sheet6[values] ),
FILTER ( Sheet6, Sheet6[date] = maxfiledate )
)
VAR maxselected =
CALCULATE ( MAX ( Sheet6[date] ), ALLSELECTED ( Sheet6 ) )
VAR maxvalue2 =
CALCULATE (
SUM ( Sheet6[values] ),
FILTER ( Sheet6, Sheet6[date] = maxselected )
)
RETURN
IF ( ISFILTERED ( 'date'[Date] ), maxvalue2, maxvalue1 )
If your case includes the scenario below:
You open the file yesterday, change the date slicer to a centain date point, then close,
Today, you open the file, its date slicer is filtered upon the file open.
In this way, my measure doesn't work as expected.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi v-juanli-msft ,
Thanks for your reply.
If we place the date slicer in drop down filter then is it possible to have those 4 dates aone in drop down filter instead of the date from 10/23/2019 to 11/23/2019 why because for eg. we dont have any values on 11/15/2019 then that date show not show in drop down filter for me.
Thanks in Advance