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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculate and plot YoY over multiple years

I have 3 years of revenue data (2019 - 2021) for a group of vendors.

The table name is 'data', and the fields are [Year], [Vendor], [Vendor Revenue].

 

I am calculating market share and YoY revenue change for each vendor, as follows:
[Revenue] = SUM('data'[Vendor Revenue])  // currency

[Market Share] = DIVIDE( [Revenue], CALCULATE( [Revenue], ALL('data'[Vendor])), 0)  // percent

[YoY Change] = DIVIDE( [Revenue], CALCULATE( [Revenue], SAMEPERIODLASTYEAR('data'[YEAR])), 0)

 

I want to be able to plot the data using a scatter chart, with each vendor appearing twice one marker for 2019-2020 and and one for 2020-2021, but I'm only getting the 2020-2021 data points.

 

I know I could do this with calculated columns in the data table, but I'm hoping I can make it dynamic since I want to add a field for product and be able to dynamically filter.

 

If my question doesn't make sense, let me know and I'll provide sample data.

 

Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , For time intelligence to work Join your date of the table with the date table marked as date table and use date from date table

[YoY Change] = DIVIDE( [Revenue], CALCULATE( [Revenue], SAMEPERIODLASTYEAR('Date'[Date])), 0)

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@amitchandak Thanks. I actually was using a date table, which I had identified as such but had forgotten to join to my data table. 😜

amitchandak
Super User
Super User

@Anonymous , For time intelligence to work Join your date of the table with the date table marked as date table and use date from date table

[YoY Change] = DIVIDE( [Revenue], CALCULATE( [Revenue], SAMEPERIODLASTYEAR('Date'[Date])), 0)

 

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.