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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Madhusmita
Frequent Visitor

Total value repeating across rows in Previous year calculation

Hi,

I am struggling to calculate the previous year values across the rows. Right now its giving me the Total value which is repeating across rows. I am expecting the values by name  for each row. Please see the screenshot and the calculation below:

 

Previous Year: 

CALCULATE(SUM(RESULTS[CADRE POINTS]),FILTER(ALL('RESULTS'),[Year]=SELECTEDVALUE(RESULTS[Year])))

 

Madhusmita_0-1676307367948.png

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Madhusmita ,

 

Please try something like this:

CALCULATE(SUM(RESULTS[CADRE POINTS]),FILTER(ALL('RESULTS'),[Name]=SELECTEDVALUE(RESULTS[Year])&&[Year]=SELECTEDVALUE(RESULTS[Year])))

 

If this doesn't work, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @Madhusmita ,

 

Please try something like this:

CALCULATE(SUM(RESULTS[CADRE POINTS]),FILTER(ALL('RESULTS'),[Name]=SELECTEDVALUE(RESULTS[Year])&&[Year]=SELECTEDVALUE(RESULTS[Year])))

 

If this doesn't work, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much for your help it worked. 🙂

Hi @Madhusmita , can you share your final solution? I mean your DAX formula. I'm asking because I didnt understand this part [Name]=SELECTEDVALUE(RESULTS[Year]) in the formula below:

 

CALCULATE(SUM(RESULTS[CADRE POINTS]),FILTER(ALL('RESULTS'),[Name]=SELECTEDVALUE(RESULTS[Year])&&[Year]=SELECTEDVALUE(RESULTS[Year])))

 

Thanks! 

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 Kudoed Authors