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
Anonymous
Not applicable

SAMEPERIODLASTYEAR()

Hi everyone,

 

I want  to use the function sameperiodlastyear:

SamePeriodLastYear = CALCULATE([Total Revenue];SAMEPERIODLASTYEAR('Date'[Date]))

but I keep receiving this error. "SAMEPERIODLASTYEAR expects a contiguous selections when the date column is not unique , has gasps or it contains time portion". Unfortunately I can't send the file here but I did the test in the pbix Customer profitability Sample which is available to download if you search for the name. Can you help?

 

Thank you for your attention

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Maybe you can take a look at following blog about use date function to manually define filter range to instead time intelligence functions:

Time Intelligence "The Hard Way" (TITHW)

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Maybe you can take a look at following blog about use date function to manually define filter range to instead time intelligence functions:

Time Intelligence "The Hard Way" (TITHW)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.