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

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

Reply
Anonymous
Not applicable

Calculated Measure in a Card not matching sum of rows in table (using sameperiodlastyear)

PBIX and test data file attached.

 

I am using the sameperiodlastyear function to calculate revenue/cost/qty/avg price by part number across YTD time period.  I then am calculating the difference between this year and last years avg price * this years qty as 'total price difference'.  All of my data looks as expected when in the table, but my totals and if I try to just display the sum of the 'total price difference' looks wildly inaccurate.  I understand the card is probably incorrect because without the table structure I am no longer calculating the average prices and differences at the part number level, which is what I need to do.  Any help on how to solve would be greatly appreciated.

 

nmuser_1-1602788816287.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

You could upload the file to onedrive and share the link here.

Or you could just show some sample data and the formulas you used to us.

 

Best Regards,

Jay

Anonymous
Not applicable

What is the secret to uploading my PBIX and excel data file?

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors