cancel
Showing results for 
Search instead for 
Did you mean: 
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
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors