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
armand453
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
Zubair_Muhammad
Community Champion
Community Champion

@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


Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@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


Regards
Zubair

Please try my custom visuals

Thank you your solution work

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.