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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.