Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Latest File Date by default whenever we open the report

Hi All,

 

I have max file date as 23 Nov 2019. I would like to display max file date as by default whenever we open the power BI report.

 

1.PNG

If i use relative date filter then it is displaying Nov 26 because today is Nov 27.

2.PNG

 

Is there a way to display max file date by default?

 

Thanks in Advance

1 ACCEPTED SOLUTION

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 )

Capture16.JPGCapture17.JPG

 

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.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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 )

Capture16.JPGCapture17.JPG

 

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.

 

Anonymous
Not 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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.