March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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?
Solved! Go to Solution.
Thanks for the reply from@PBI_learn_NK ,please allow me to provide another insight:
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:
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:
4.Finally, the measure is removed from the column.Here's my final result, which I hope meets your requirements.
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.
Thanks for the reply from@PBI_learn_NK ,please allow me to provide another insight:
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:
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:
4.Finally, the measure is removed from the column.Here's my final result, which I hope meets your requirements.
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.
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
Add a Date Column for Filtering:
Set Up the Slicer and Filter:
Adjust the Date Slicer:
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |