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
Anshenterprices
Helper IV
Helper IV

selected Default date should be as last date on Date slicer

Hi Team,

Source data

DateSales
8/28/2021129
8/27/2021214
8/26/2021299
8/25/2021384
8/24/2021469
8/23/2021554

 

when user's open the report he should see default date is last date and after that he can select any other dates from the date slicer.and also daily user's need latest date and sales in pdf format via email subscription.



Thanks

 

 

8 REPLIES 8
VahidDM
Super User
Super User

Hi @Anshenterprices 

 

Could you please tell us more details about your request.

BTW, you can use LASTDATE dax code to find the last date.

Something like this: 
Last Date = LASTDATE(Table[Date])

 

Did I answer your question? Mark my post as a solution!

Appreciate your Kudos VahidDM_0-1630401000264.png !!

@VahidDM Please check.

@Anshenterprices 

 

Try to use this measure:

 

Last Date =
SELECTEDVALUE ( 'Table'[Date], LASTDATE ( 'Table'[Date] ) )

 

by default if nothing is selected, it will return the last date, otherwise, will select the selected date.

 

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

Appreciate your Kudos VahidDM_0-1630402671254.png !!

 

 

Always it should select the latest date .. like below:-

 

Anshenterprices_0-1630406259168.png

 

HI @Anshenterprices,

AFAIK, power bi slicers did not support setting default values.

For your requirement, I'd like to suggest you switch to relative date mode or create a calculated column to remark the last date, then you can choose this one on your slicer to pick the last date.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@Anshenterprices 

It will return latest date if you don't select any date by slicer.

Try it and let me know if it does not work.

 

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

Appreciate your Kudos VahidDM_0-1630484497505.png !!

 

@VahidDM  Measure doesn't work on slicer.

if its possible, please send me PBIX file

Hi @Anshenterprices,

Any update for this? If you are not so clear about my description, you can check the below link about the last date on the slicer:

Solved: latest date in the slicer - Microsoft Power BI Community
Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.