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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
aletho
Helper I
Helper I

Query help - sameperiodlastyear

 

Hello

 

I am trying to make a comparison dashboard and would like to make some "cards" showing how the company performed in the same period last year. One for the same month last year and one for the same day. When creating the "same day" card, it is important that it is not the same day in like the 30th of August, but instead the same Thursday. Which is why I have used the "-1" in the query below. 

Anyways, I can't get it to work. Can anyone help me? 

 

Thanks.  

 

TurnoverSameDayLast year= CALCULATE(SUM(PaymentLog[Amount]),PaymentLog[inheritanceTypeName]="tenant_search_profile", SAMEPERIODLASTYEAR('Date'[Date].[Day]-1))

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

Hi@ aletho

You can try to use this formal, do not use 'Date'[Date].[Day] in your measure

TurnoverSameDayLast year= CALCULATE(SUM(PaymentLog[Amount]),PaymentLog[inheritanceTypeName]="tenant_search_profile", SAMEPERIODLASTYEAR('Date'[Date]))

Best Regards,

Lin

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

View solution in original post

1 REPLY 1
v-lili6-msft
Community Support
Community Support

Hi@ aletho

You can try to use this formal, do not use 'Date'[Date].[Day] in your measure

TurnoverSameDayLast year= CALCULATE(SUM(PaymentLog[Amount]),PaymentLog[inheritanceTypeName]="tenant_search_profile", SAMEPERIODLASTYEAR('Date'[Date]))

Best Regards,

Lin

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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