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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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.

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.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.