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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
IloveTigray
New Member

sameperiodlastyear dax value is not displayed in the visual in power bi desktop?

I am new to DAX. I have simple table for just trying DAx time intelligence functions.

dataset:

IloveTigray_3-1700747358377.png

I created to measures as below:

totalsales TY = CALCULATE((SUM(Sheet2[amount]))) // works fine
SAMEPERIODLASTYEAR = CALCULATE([totalsales TY], SAMEPERIODLASTYEAR(Sheet2[recorddate])) // display total sum correctly.
 
then I add a table visual and added the columns:
IloveTigray_1-1700747149667.png

 

Result:

IloveTigray_2-1700747287267.png

 

Unfortunately the column in sameperiodlastyear is empty but the sum on its footer is correct.

kindly assist how to show the values of the same period last year for each row.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I believe this is because the individual product categories do not have an amount value for last year, the total is summing all of the sales figures except the one from the most recent date in your table as there is no product filter context on the total row in the table. If you were to remove the product column from your table visual, it should work as you'd expect. Also, if you added in more rows for each product with different date values that would also get it to show at row level.

View solution in original post

2 REPLIES 2
IloveTigray
New Member

as per your suggestion, I removed product, then it worked. thank you

Anonymous
Not applicable

I believe this is because the individual product categories do not have an amount value for last year, the total is summing all of the sales figures except the one from the most recent date in your table as there is no product filter context on the total row in the table. If you were to remove the product column from your table visual, it should work as you'd expect. Also, if you added in more rows for each product with different date values that would also get it to show at row level.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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