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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
homelander123
Helper I
Helper I

Default view to last 13 months

Hi, 

I have a report and i want to set the defualt view of the visualizations to last 13 months. There is 3 years of data in the dataset and when i apply filters on the visualization or the page, the date slicer does not show an option to select data from the date prior to last 13th month. 

Is there a way i can fix this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from@PBI_learn_NK ,please allow me to provide another insight:

Hi,@homelander123 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1720420707756.png

2.Below are the measure I've created for your needs:

The first  is to include the entire month, ending on the last day of the month 13 months ago.

 

diff1 = 
IF ( DATEDIFF ( MAX ( 'Table'[Date] ), TODAY (), MONTH ) <= 13, 1, 0 )

 

The second is exactly 13 months according to the present, accurate to the day.

 

diff2 = 
IF ( SUM ( 'Table'[Date] ) >= EDATE ( TODAY (), -13 ), 1, 0 )

 

3.Then add the measure to the visualization, and then modify the visualization settings as shown in the following image:

vlinyulumsft_1-1720420820373.png

4.Finally, the measure is removed from the column.Here's my final result, which I hope meets your requirements.

vlinyulumsft_2-1720420839901.png

vlinyulumsft_3-1720420849674.png

5.Here is the relevant documentation:

EDATE function - Microsoft Support

DATEDIFF (Transact-SQL) - SQL Server | Microsoft Learn

 

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

 

 

 

 

View solution in original post

4 REPLIES 4
homelander123
Helper I
Helper I

@PBI_learn_NK Can you please look at the newest message

Anonymous
Not applicable

Thanks for the reply from@PBI_learn_NK ,please allow me to provide another insight:

Hi,@homelander123 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1720420707756.png

2.Below are the measure I've created for your needs:

The first  is to include the entire month, ending on the last day of the month 13 months ago.

 

diff1 = 
IF ( DATEDIFF ( MAX ( 'Table'[Date] ), TODAY (), MONTH ) <= 13, 1, 0 )

 

The second is exactly 13 months according to the present, accurate to the day.

 

diff2 = 
IF ( SUM ( 'Table'[Date] ) >= EDATE ( TODAY (), -13 ), 1, 0 )

 

3.Then add the measure to the visualization, and then modify the visualization settings as shown in the following image:

vlinyulumsft_1-1720420820373.png

4.Finally, the measure is removed from the column.Here's my final result, which I hope meets your requirements.

vlinyulumsft_2-1720420839901.png

vlinyulumsft_3-1720420849674.png

5.Here is the relevant documentation:

EDATE function - Microsoft Support

DATEDIFF (Transact-SQL) - SQL Server | Microsoft Learn

 

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

 

 

 

 

homelander123
Helper I
Helper I

how to ensure the slicer is not limited by the islast13months filter? 

I did apply the is last 13 months filter on one of the visuals but its the same problem since that visual does not go prior to last 13 months

PBI_learn_NK
Frequent Visitor

Add a Date Column for Filtering:

  • In your data model, create a new calculated column to flag the last 13 months. For example, if your date column is Date, you can create a new column IsLast13Months:
    IsLast13Months =
    IF(
    'YourTable'[Date] >= TODAY() - 365*3 &&
    'YourTable'[Date] <= TODAY() &&
    'YourTable'[Date] >= EDATE(TODAY(), -13),
    1,
    0
    )
    1. Set Up the Slicer and Filter:

      • Add the new IsLast13Months column as a slicer or visual level filter in your report.
      • Set the slicer or filter to IsLast13Months = 1 to show only the last 13 months by default.
      • This will ensure the visualizations are filtered to the last 13 months.
    2. Adjust the Date Slicer:

      • Add your original date column (Date) to a slicer.
      • Ensure this slicer is not limited by the IsLast13Months filter.

    By separating the filter logic (to set the default view) from the slicer (to provide full date range selection), you achieve both objectives: defaulting to the last 13 months while allowing users to select dates from the entire dataset.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors