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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

SAMEPERIODLASTYEAR is not working on previous year

Dears,

 

Here, I face a quesion that has been borthering me for several days.

 

First, below figure is my modeling relationship(1 is Fact Table, 2~4 are dimension Table), I would like to do a dynamic dimension form about Current Year VS Prebious Year, 

Sallyzhang_0-1669354991171.png

 

But, the PY result aloways on the PY year Not on Current Year(By week & By Month), By day is correct, like below figure 

Sallyzhang_1-1669355463712.png

Dex: 

 

SO qty = CALCULATE(
             SUM('EL SO Report'[SO qty]))

 

SO qty LY = CALCULATE(
                [SO qty],  
                SAMEPERIODLASTYEAR('Filter Date'[Document Date]))

 

I guess mybe this mapping relationship affect my Dex, but I DON'T have any better choice,hope someone could help me to identify this problem, thanks!

1 REPLY 1
lbendlin
Super User
Super User

Time Intelligence functions like SAMEPERIODLASTYEAR expect a calendar table that is contiguous and covering (including the result of the computation)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.