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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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