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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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