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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
ShrimpCreole
Helper I
Helper I

Switching Between Periods Presented Using Rolling-12 Summations

I can not for the life of me figure how to write a measure where I can show rolling-12 revenue from month to month and provide the user the ability to select the period to view it in (2, 3, 5, 10 year).

 

Help!

1 ACCEPTED SOLUTION

Hi, @ShrimpCreole 

Try to enter a new table :

veasonfmsft_0-1665476833483.png

 

YTD =
CALCULATE ( SUM ( Sales[Sales Amount] ), DATEADD ( 'Date'[Date], -1, YEAR ) )
13M =
CALCULATE ( SUM ( Sales[Sales Amount] ), DATEADD ( 'Date'[Date], -13, MONTH ) )

 

....

Then add a new measure like:

New measure=
SWITCH (
    SELECTEDVALUE ( 'Slicer Table'[Period] ),
    "YTD", [YTD],
    "13M", [13M],
    "2YR", [2YR],
    "3YR", [3YR],
    "5YR", [5YR],
)

Best Regards,
Community Support Team _ Eason

 

View solution in original post

3 REPLIES 3
Shaurya
Memorable Member
Memorable Member

Hi @ShrimpCreole,

 

I am trying to figure out precisely, what you want. I get that you need cumulative revenue across months. Care to elaborate how you want the period selection to work?

Sorry I did a poor job of explaining my issue.

I want the user to have the ability to select the viewing period using the attached visual.   I can do this when I display monthly revenue totals, but do not know how to do so showing roll-12 totals.  The chart would provide monthly figures over the period.periods.jpg

 

Hi, @ShrimpCreole 

Try to enter a new table :

veasonfmsft_0-1665476833483.png

 

YTD =
CALCULATE ( SUM ( Sales[Sales Amount] ), DATEADD ( 'Date'[Date], -1, YEAR ) )
13M =
CALCULATE ( SUM ( Sales[Sales Amount] ), DATEADD ( 'Date'[Date], -13, MONTH ) )

 

....

Then add a new measure like:

New measure=
SWITCH (
    SELECTEDVALUE ( 'Slicer Table'[Period] ),
    "YTD", [YTD],
    "13M", [13M],
    "2YR", [2YR],
    "3YR", [3YR],
    "5YR", [5YR],
)

Best Regards,
Community Support Team _ Eason

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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