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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.