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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

12 month rolling chart with Month Slicer

I have a model as shown below

timEalll_0-1671211881094.png

 

I created a visual below. I added filter Reporting Period for 12 months on the filter panel.

timEalll_1-1671211902795.png

I want to create a 12 month rolling chart with a slicer month. I want the slicer MonthYear to filter the chart based on the monthyear selected back to 12 month rolling. For example, when I select Dec-22 on the slicer, then I want the visual to filter from Dec-22 to Nov-21 (12 months).

How can I achieve this? 

 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
sturlaws
Resident Rockstar
Resident Rockstar
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Access Denied message.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Anonymous,

 

You need a separate, unconnected date table. Remove the relative filtering on your measure.

 

Write a measure like this:

Measure1 =
VAR _date_unconnected =
    CALCULATE ( SELECTEDVALUE ( 'Dates unnconnected'[month] ) )
VAR _date =
    CALCULATE ( SELECTEDVALUE ( Dates[Month] ) )
RETURN
    IF (
        ISBLANK ( _date_unconnected ),
        SUM ( sales[sales] ),
        CALCULATE (
            SUM ( sales[sales] ),
            FILTER (
                ALL ( Dates ),
                _date >= ( _date_unconnected - 365 )
                    && _date <= _date_unconnected
                    && Dates[Month] = _date
            )
        )
    )

 

where month is the first day of every month.

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.