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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SQUILES
Helper I
Helper I

Extract value Lookup Value

HI, 

 

I need to get the value of 7 days ago. Example:

For 7/1/2019 i need the value of 6/24/2019

For 7/2/2019 i need the value of 6/25/2019

 

I try this column measure but give me a wrong value:

LookupValueofPrevDate = CALCULATE(MAX('T8 Wireless'[DATO_30]),FILTER('T8 Wireless',WEEKDAY('T8 Wireless'[DATA_PERIODO])=WEEKDAY(DATEADD('T8 Wireless'[DATA_PERIODO],-7,DAY))))
 
Any help will be appreciate. Thanks Again.
 
LookupValue.JPG
1 ACCEPTED SOLUTION

@VijayP  thanks for your answer, but is not working.

May be my explination is not clear.

I need the value of 7 day ago to calculate.

For 7/1/2019 i need the value of 6/24/2019

 

 LookupValue2.JPG

View solution in original post

2 REPLIES 2
VijayP
Super User
Super User

CALCULATE(TotalSales,filter(all(dates),date[date]=date[date]<6) Try this


@SQUILES wrote:

HI, 

 

I need to get the value of 7 days ago. Example:

For 7/1/2019 i need the value of 6/24/2019

For 7/2/2019 i need the value of 6/25/2019

 

I try this column measure but give me a wrong value:

LookupValueofPrevDate = CALCULATE(MAX('T8 Wireless'[DATO_30]),FILTER('T8 Wireless',WEEKDAY('T8 Wireless'[DATA_PERIODO])=WEEKDAY(DATEADD('T8 Wireless'[DATA_PERIODO],-7,DAY))))
 
Any help will be appreciate. Thanks Again.
 
LookupValue.JPG

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@VijayP  thanks for your answer, but is not working.

May be my explination is not clear.

I need the value of 7 day ago to calculate.

For 7/1/2019 i need the value of 6/24/2019

 

 LookupValue2.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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