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
Anonymous
Not applicable

Add multiple previous years worth of data

I have a measure that forecasts out yearly sales, from 2021 - 2023. Each sale will have reoccurring fees associated with it.

In 2021, we will only have fees associated with sales in 2021. 

In 2022, we have fees associated with sales in 2022 + all the items sold in 2021.

In 2023, we have all fees associated with sales in 2023 + 2022 + 2021. 

 

I need a measure that shows the total reoccuring fees expected for each year.

 

This needs to be scalable, so hardcoding a measure '2021 Sales Total', '2022 Sales Total', etc will not work if I want to add more years.

 

For example, sales matrix could look like this:

Product2020202120222023
Prod110203040
Prod220406080
Prod31357

 

 

Then, a running total output would look like this:

Product2020202120222023
Prod1103060100
Prod22060120200
Prod314916
3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , You can create this year and prior year measure with or without time intelligence

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

 

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

Thanks @amitchandak . I will look into the links you provided.

I have edited my post to include sample tables to outline what I am talking about

@Anonymous , In case you have date cumulative should work like

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

 

In the case of only year with the year/date table

Cumm Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]<=max('Date'[Year])))

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.