Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I am trying to calculate a Rolling YTD SUM of Revenue and compare that with previous years for the same date range. For example, today is July 3rd, I want to see my YTD revenue and compare that with the YTD revenue for 2017 and 2018 up to July 3rd. How can I create a measure to show this as a rolling total on a line chart?
I currently have this formula:
Cumulative Revenue1 = CALCULATE(SUM(factRevenue[RevenueAmount]),
FILTER(ALLSELECTED(factRevenue[RevEarnedDate].[Day]),
ISONORAFTER(factRevenue[RevEarnedDate].[Day],Max(factRevenue[RevEarnedDate].[Day]),DESC)))
Which produces this:
How can I limit the 2017 and 2018 lines to just be through today.
Hi W33628,
If you want to get rolling value based on today() for same period, right? Below is my design:
My sample
Measure 10 =
IF (
MONTH ( MIN ( rolling[DATE] ) ) <= MONTH ( TODAY () )
&& DAY ( MIN ( rolling[DATE] ) ) <= DAY ( TODAY () ),
CALCULATE (
TOTALYTD ( SUM ( rolling[quantity] ), rolling[DATE], ALL ( rolling ) )
),
BLANK ()
)If you want show 12 month in x-axis, you could set x-axis ->end=12
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In using that formula I am still gettting all of July for 2017 and 2018 in my chart rather than just through the partial month of July.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.