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
MikeSolvesBI
Helper II
Helper II

DAX examples that default to the current year month and then allow a user to select any year month

Hello,

Are three any good examples with DAX Date Calculations for the following:

 

1. Have a Year Month Slicer.

 

2. When there is no selection in the Year Month Slicer default to the current Year Month

 

3. Allow the user to select a Year Month (Jan-2023) and then use the Year Month in all the Calculations

 

Thank You,

 

Michael

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

This is the standard pattern for your request:


- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

This is the standard pattern for your request:


- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app

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.