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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
kruzack
Frequent Visitor

Last 13 Months + Weekly

Hi,

 

I have to show trend for last 13 months.

Data I have is at weekly level (first day of week).

 

Through the slicer when a month is selected, the visual should show the current month in terms of weeks and then the previous 12 months as month ends data.

 

Can someone please help me on how to go about it.

 

Thanks, 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @kruzack ,

Please have a try.

Create a measure.

Last 13 Months = 
VAR SelectedDate = MAX(Calendar[Month])
VAR DateDiff = DATEDIFF(Sales[Date], SelectedDate, MONTH)
RETURN
IF(DateDiff <= 0 && DateDiff > -13, 1, BLANK())

Solved: Show last 13 months based on user single slicer se... - Microsoft Fabric Community

Show last 13 Months from Slicer Selection in Power BI (DAX) - YouTube

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

1 REPLY 1
Anonymous
Not applicable

Hi @kruzack ,

Please have a try.

Create a measure.

Last 13 Months = 
VAR SelectedDate = MAX(Calendar[Month])
VAR DateDiff = DATEDIFF(Sales[Date], SelectedDate, MONTH)
RETURN
IF(DateDiff <= 0 && DateDiff > -13, 1, BLANK())

Solved: Show last 13 months based on user single slicer se... - Microsoft Fabric Community

Show last 13 Months from Slicer Selection in Power BI (DAX) - YouTube

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.