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

Show average for same period last year

Hi all,

 

I wanted to see if there was a way to show what the average of last year was on a line graph.  So say the average for this graph below is the average of week 34 of 2018, is there any way i can show the average of week 34 for 2017 either through a line or a tooltip 

 

Captu5re.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Show average for same period last year

Hi @thenovice,

 

I made one sample for your reference.

 

1. Create a date table and create relationship between fact table and it.

 

Table = CALENDARAUTO()

2. Create the measures as below.

 

sumsa = CALCULATE(SUM(Table1[sales]),SAMEPERIODLASTYEAR(Table1[date]))
avesamp = SUMX(ALLSELECTED(Table1),[sumsa])/CALCULATE(COUNTROWS(Table1),FILTER(ALLSELECTED(Table1),SAMEPERIODLASTYEAR(Table1[date])))

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

 

 

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

5 REPLIES 5
Super User
Super User

Re: Show average for same period last year

Should be able to use a measure in your tooltip. See if my Time Intelligence the Hard Way provides a way of accomplishing what you are going for.

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


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

thenovice Frequent Visitor
Frequent Visitor

Re: Show average for same period last year

Currently trying this, thank you very much by the way. What would i put at the end of the measure where it say "[Value]"

Community Support Team
Community Support Team

Re: Show average for same period last year

Hi @thenovice,

 

I made one sample for your reference.

 

1. Create a date table and create relationship between fact table and it.

 

Table = CALENDARAUTO()

2. Create the measures as below.

 

sumsa = CALCULATE(SUM(Table1[sales]),SAMEPERIODLASTYEAR(Table1[date]))
avesamp = SUMX(ALLSELECTED(Table1),[sumsa])/CALCULATE(COUNTROWS(Table1),FILTER(ALLSELECTED(Table1),SAMEPERIODLASTYEAR(Table1[date])))

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

 

 

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

thenovice Frequent Visitor
Frequent Visitor

Re: Show average for same period last year

Thank you so much! Will this work if i add it in as a tool tip, because i have a line graph already. 

Community Support Team
Community Support Team

Re: Show average for same period last year

Hi @thenovice,

 

Please refer to the picture.

 

2.PNG

 

Regards,

Frank

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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

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

Users Online
Currently online: 48 members 1,026 guests
Please welcome our newest community members: