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! Learn more

Reply
Abhijsrwala1
Frequent Visitor

SampePeriodLastYear Help

Abhijsrwala1_0-1652271279901.png

 

I don't know what's wrong here.I see blanks for values.I think I am missing something.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Abhijsrwala1 ,

 

You need a calendar table.

CALENDAR = CALENDAR(MIN('FACT SOPO'[Date]),MAX('FACT SOPO'[Date]))

Relationships.

vcgaomsft_1-1652691129093.png

Try this measure.

Qty N-1 = CALCULATE([Measure],DATEADD('CALENDAR'[Date],-12,MONTH))

Attached PBIX file for reference.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

6 REPLIES 6
SanketBhagwat
Solution Sage
Solution Sage

Hi @Abhijsrwala1 .

Check to see if you have data for those date in the data view.

Filter the CY for that date and see if you see the summarized daat for that date.

Thanks,
Sanket

If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up.

I have data for the dates.

In your case,as per your date selection i.e. 10th Jan 2019, you should have a data for 10th Jan 2018.

What I mean to say is that any date you are selecting should have the data for the same date but for the last year.

See if you have data for 10th Jan 2018.

How to get last year same month.

Anonymous
Not applicable

Hi @Abhijsrwala1 ,

 

You need a calendar table.

CALENDAR = CALENDAR(MIN('FACT SOPO'[Date]),MAX('FACT SOPO'[Date]))

Relationships.

vcgaomsft_1-1652691129093.png

Try this measure.

Qty N-1 = CALCULATE([Measure],DATEADD('CALENDAR'[Date],-12,MONTH))

Attached PBIX file for reference.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

How to get last year same month.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.