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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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