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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
henry24007
Helper I
Helper I

measure does not work

henry24007_1-1658203408916.png

 

I have two measures to calcuate the score last year and this year which shown in above image(last year1 and this year1) , but the last year measure goes wrong and I can't figure out why.

 

Here are two measures:

 

This Year1 = CALCULATE(SUM('Score (2)'[Score]),filter(ALL('year'),'year'[year]=max('year'[year])))
 
Last Year1 = CALCULATE(sum('Score (2)'[Score]),filter(ALL('year'),'year'[year]=max('year'[year])-1))
 
 
And in my power query table, I have added a index for every 23 rows in order which show in below and if I cencel this, the above measure will work, but I have to contain this every 23 rows order for other operations . is there any way I can make the measure work? Thanks
henry24007_2-1658203638341.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@henry24007 , The measures seem fine. Make sure year table is joining with this table and 1 - Many single direction join from Year to this table.

 

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

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
amitchandak
Super User
Super User

@henry24007 , The measures seem fine. Make sure year table is joining with this table and 1 - Many single direction join from Year to this table.

 

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I solved it. it seems like my relationship line is so messy that it affected the measure. anyway thanks for your help again

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors