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
tstackhouse
Helper III
Helper III

Showing % Change year over year

I am attempting to recreate these two visuals in power bi, I have not been sucessful thus far.

What I am attempting to create are two graphs:

One that shows % growth on a continous line from month to month 2017-2018. 

One that shows % growth 2017 compared to 2018.

 

Since I cannot attach a work book.... I have attached a photo for reference.CapturePBI.PNG

 

Thank you in advance.

1 ACCEPTED SOLUTION

Hi @tstackhouse,

 

Which visual isn't created successfully? Seems your first visual works. Please try to create measures like below.

1. The first visual.

MonthToMonth =
DIVIDE (
    SUM ( 'table'[Monthly] ),
    CALCULATE ( SUM ( 'table'[Monthly] ), PREVIOUSMONTH ( datetable[date] ) )
)

2. The second visual.

MonthToMonthYearly =
DIVIDE (
    SUM ( 'table'[Monthly] ),
    CALCULATE ( SUM ( 'table'[Monthly] ), SAMEPERIODLASTYEAR ( datetable[date] ) )
)

Best Regards,

Dale

Community Support Team _ Dale
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

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @tstackhouse,

 

Could you please tell me if you solved it? Can you share the answer or mark the proper answer as a solution, please?

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

If you have a true date field, create a Calender table and relate it and then you should be able to use the built-in Time Intelligence Quick Measures. Otherwise, check out my Quick Measure Gallery item here:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I have created a calendar table:

Calendar = CALENDAR(FIRSTDATE(Query1[Invdate]),date(2030,12,31))

 

I have a "Year" column for all of my dates:

Year = year('Calendar'[Date]) 

 

I have a "Month" column:

Month = format('Calendar'[Date],"MMMM" )

 

I have a "Month and Year" Column:

Month and Year = 'Calendar'[Year]&" "&'Calendar'[Month]

 

These are the only columns in my Calendar table, I have created a relationship between my 2 tables via Invoice date and Date.

I have tried to use there formulas as a base model but have not had any luck.

Hi @tstackhouse,

 

Which visual isn't created successfully? Seems your first visual works. Please try to create measures like below.

1. The first visual.

MonthToMonth =
DIVIDE (
    SUM ( 'table'[Monthly] ),
    CALCULATE ( SUM ( 'table'[Monthly] ), PREVIOUSMONTH ( datetable[date] ) )
)

2. The second visual.

MonthToMonthYearly =
DIVIDE (
    SUM ( 'table'[Monthly] ),
    CALCULATE ( SUM ( 'table'[Monthly] ), SAMEPERIODLASTYEAR ( datetable[date] ) )
)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.