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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Baseyear value used for comparison for other years

I am having difficulty trying to figure a way to keep the calculated 2018 data as base value and compare the similar month values from other years to it, in order to determine if we are above the criteria base value (2018) or below.

I have 4 columns, where the RED marked ones are not important for this.
nr. 1: has multiple names. where each has different values (nr. 3) for each year from 2018 and onwards.

column Aar is year.

nr. 2 is the monthly 1 - 12 number.

nr. 3 is the value and nr. 4 is the 73% of the nr. 3 for year 2018 (base year).

Now I am trying to reuse the values for nr. 4 for each corresponding month for each year and it must be the related name. 

I have tried anything possible..and cant seem to make it work. any suggestions? 

Also Calculate() doesnt work unless you either use min, max, sum etc. in other words scalar values.  

 

Alisina_0-1653329637374.png

thanks in advance

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You need a new column like

Sumx(filter(Table, [Name] =earlier([Name]) && [Month] =earlier([Month]) && [Year] =2018) , [value])

 

or a new measure with help from date table or a separate year table

 

calculate(Sum(table[Value]), filter(all('Date'), 'Date'[Year] = 2018))

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

It wasnt exactly as your code, but your idea of using earlier() gave me the result i wanted: So the solution ended being: 

calculate(min(Value),filter(table,Names=earlier(Names) && Date[month] =earlier([Month])))
Thank you


amitchandak
Super User
Super User

@Anonymous , You need a new column like

Sumx(filter(Table, [Name] =earlier([Name]) && [Month] =earlier([Month]) && [Year] =2018) , [value])

 

or a new measure with help from date table or a separate year table

 

calculate(Sum(table[Value]), filter(all('Date'), 'Date'[Year] = 2018))

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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