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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
davidell
Frequent Visitor

LY calculation, Date hierarchy - potentiel bug?

Hi guys,

I've come across a problem, which I'm not able to understand and don't know, if its a bug or not?

 

I'm working with the adventureworks dataset. Here I've created three calculated measures:

Total Sales =SUM('Sales Data'[Total Revenue])

Total Sales = SUM(FactInternetSales[SalesAmount]) 

Total Sales LY = CALCULATE([Total Sales];SAMEPERIODLASTYEAR(DimDate[FullDateAlternateKey]))

When I change the date dimension (FullDateAlternateKey) into showing full dates (dd-mm-yy). Everything works fine (see the attached pictures). However when I change the FullDateAlternateKey into showing DateHierarchy, the values are missing in Total Sales LY but the grand total i shown.

Is this a bug?

Thank you very much

Regards,
David
PBI-Works (002).pngPBI-Bug (002).png

 

 

5 REPLIES 5
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @davidell,

 

Based on my test, no matter whether I set full dates (dd-mm-yy) or DateHierarchy, the LY calculation can return correct results. Please see below image.

1.PNG

2.PNG3.PNG

 

I used the same DAX formulas as yours. In your scenario, please re-create the measures and visuals to see whether issue persists. If possible, you can share your .pbix file for more analysis if your data source was connected with import mode.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey Yuliana,

Sorry for the late response and thank you for your reply.

I tried what you said, but it still produces the same result

I simply dont get it.

Best regards,

David

Hi @davidell,

 

Please share your pbix file so that I can check for you.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Silly question..

How do I upload .pbix files to the community? ;/

Is there a button somewhere?

Hi @davidell,

 

You can also upload your .pbix file to OneDrive and share the link with me.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.