cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Select latest date from the table in the slice

Hi Folks,

Thanks for addressing my query.

I need that my slicer will auto select the latest date from the drop down list. Is there any solutions??

Thanks,
Gaurav Jangra

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Select the most recent date from the table in the slice

@gauravjangra09 , That is where you need to have column like

Date Type = SWITCH(TRUE(),'Date'[Date]=max(Table[Date]),"Lastest Date" //Date equal to max of fact/table
,'Date'[Date]&"")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: Select latest date from the table in the slice

@gauravjangra09 , There no auto select option.

 

You have to use one of these tricks. Have a column like this and select the value. Sort this column on date column

 

new Columns
Date Type = SWITCH(TRUE(),'Date'[Date]=TODAY(),"Today"
,'Date'[Date]=TODAY()-1,"Yesterday"
,'Date'[Date]&"")


Date Type = SWITCH(TRUE(),'Date'[Date]=Max('Table'[Date]),"Lastest Date"
,'Date'[Date]&"")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: Select the most recent date from the table in the slice

Hi @

Thanks for your reply.

This case is acceptable when data is updating regularly what should i do when i didn't have the latest data.
let suppose in my table i have latest record is for 13th September. then how i will address this.

Thanks,
Gaurav Jangra

Highlighted
Super User IV
Super User IV

Re: Select the most recent date from the table in the slice

@gauravjangra09 , That is where you need to have column like

Date Type = SWITCH(TRUE(),'Date'[Date]=max(Table[Date]),"Lastest Date" //Date equal to max of fact/table
,'Date'[Date]&"")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Community Support
Community Support

Re: Select latest date from the table in the slice

Hi @gauravjangra09 

If you want to get the latest date by slicer, you can build a measure.

Due to I don't know your data model, I build a sample to have a test.

Measure:

M.Value = 
VAR _Value =
    SUM ( 'Table'[Value] )
VAR _LatestDate =
    MAXX ( ALL ( 'Table' ), 'Table'[Date] )
VAR _LatestValue =
    CALCULATE (
        SUM ( 'Table'[Value] ),
        FILTER ( 'Table', 'Table'[Date] = _LatestDate )
    )
RETURN
    IF ( ISFILTERED ( Sclier[Slicer] ), _LatestValue, _Value )

In table visual it will show all Dates as default and show the latest Date if you select the Slicer.

1.png

You can download the pbix file from this link: Select latest date from the table in the slicer

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (820)