cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abloor Regular Visitor
Regular Visitor

Show data for Year to Date, but in comparison to all previous years

Hi, I'm trying to do a graph that shows all revenue made year to date (from January, only up until the CURRENT month) for all years.  

 

I created the below, but using a report level filter where I ticked January-June.  I don't want to have to go into the filter each month to add in the latest month, and would prefer to have DAX to tell it to include 'up to and including the current month', and then compare this to the same months in each previous year.

 

Can anyone help please? Thank you!

 

 

YTD 1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Show data for Year to Date, but in comparison to all previous years

@abloor 

 

You may try adding the measure below.

Measure =
CALCULATE (
    SUM ( 'Table'[Revenue] ),
    MONTH ( 'Table'[Date] ) <= MONTH ( TODAY () )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Show data for Year to Date, but in comparison to all previous years

@abloor 

 

You may try adding the measure below.

Measure =
CALCULATE (
    SUM ( 'Table'[Revenue] ),
    MONTH ( 'Table'[Date] ) <= MONTH ( TODAY () )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
abloor Regular Visitor
Regular Visitor

Re: Show data for Year to Date, but in comparison to all previous years

Thank you @v-chuncz-msft , using your response with a few tweaks I got it to work.  I was basing the revenue off a measure, not a column, so changed it to this:

 

REVENUE NET YTD =
CALCULATE ([RevenueNet],
MONTH('Calendar'[Month]) <= MONTH(TODAY())
)

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 435 members 4,358 guests
Please welcome our newest community members: