cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
armand453 Frequent Visitor
Frequent Visitor

DAX - Compare Actual month vs January

Hello,

 

I have a table with revenue by month on several year and i'd like to compare the growth of the revenu of the current month vs january of the same year. Is it possible to do that please?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: DAX - Compare Actual month vs January

@armand453

 

Try this MEASURE

Please see attached file as well

 

Growth Measure =
VAR mymonth =
    SELECTEDVALUE ( 'Calendar'[Date].[MonthNo] ) - 1
VAR Jan_Same_year =
    CALCULATE (
        SUM ( Table1[Sales] ),
        DATEADD ( 'Calendar'[Date], - mymonth, MONTH )
    )
RETURN
    DIVIDE ( SUM ( Table1[Sales] ), Jan_Same_year ) - 1

againstJan.png

View solution in original post

2 REPLIES 2
Super User
Super User

Re: DAX - Compare Actual month vs January

@armand453

 

Try this MEASURE

Please see attached file as well

 

Growth Measure =
VAR mymonth =
    SELECTEDVALUE ( 'Calendar'[Date].[MonthNo] ) - 1
VAR Jan_Same_year =
    CALCULATE (
        SUM ( Table1[Sales] ),
        DATEADD ( 'Calendar'[Date], - mymonth, MONTH )
    )
RETURN
    DIVIDE ( SUM ( Table1[Sales] ), Jan_Same_year ) - 1

againstJan.png

View solution in original post

armand453 Frequent Visitor
Frequent Visitor

Re: DAX - Compare Actual month vs January

Thank you your solution work

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 59 members 1,201 guests
Please welcome our newest community members: