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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DelVosa
Frequent Visitor

Rolling revenu up till selected month shown in Graph

Hi All

 

I am struggling to display the rolling monthly revenue by clicking a filter linked to the months.

 

Based on the period filter (right top) I focus on the results of that specific month and the year to date results. The monthly and ytd revenue is calculated as follows and works fine (red circle):

Rev = sum('AS$Projects'[Opbrengsten])
Rev ytd = TOTALYTD([Rev],DatumTabel[DatumParameter],all(DatumTabel[DatumParameter]),"31/08")
 
I now want to show the rolling revenue mtd and ytd in a graph (yellow circle) based on the selection of the month. 
It works when I disable the interaction between the month filter and the graph and I manually select the months I want to show. But this is static! When the user swithes the filter to NOV, the graph doesn't change off course. I want this to be dynamic.
 
I would like to have the visualization of the rolling revenue linked to the filter. If I click Dec, i would like the graph to show Sep-Dec. If I click Nov, I would like to see Sep-Nov
Is there a way to do this?
By clicking one filter i would like to see the MTD results, YTD results, rolling MTD up till that month and rolling YTD of the month.
One important remark: my year starts on first of September and not 01/01
 

DelVosa_1-1644243460886.png

 

Thanks a lot!

Regards

Jordy

 

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @DelVosa ,

 

Please try to create a measure like below and use the month from fact table as x-axis.

Measure =

var _max = MAX('Date'[Date])
return
CALCULATE(SUM(financials[ Sales]),DATESYTD(('Date'[Date]),"8/31"),'Date'[Date]<=_max)

Vlianlmsft_0-1645174315961.pngVlianlmsft_1-1645174337813.png

 

 

Best Regards,
Liang
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

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @DelVosa ,

 

Please try to create a measure like below and use the month from fact table as x-axis.

Measure =

var _max = MAX('Date'[Date])
return
CALCULATE(SUM(financials[ Sales]),DATESYTD(('Date'[Date]),"8/31"),'Date'[Date]<=_max)

Vlianlmsft_0-1645174315961.pngVlianlmsft_1-1645174337813.png

 

 

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

amitchandak
Super User
Super User

@DelVosa , if you want measure switch, You can use measure slicer

measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://www.youtube.com/watch?v=vlnx7QUVYME

 

 

But if you want to changes axis column, then you have use bookmarks

 

Axis Slicer
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors