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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
pelucapampa
Helper I
Helper I

LookupValue

Hi, I've a Table with exchange Rates and Sales Table.

My Exchange Rate, don't have value for a weekends days, when I insert a New Column into a Sales Table with Exchange rate, I cannot obtain Exchange Rate for weekends day.

 

Have you any Ideas to search Friday Exchange Rate for weekends days?

1 ACCEPTED SOLUTION

Thanks for your reply, I resolved!!!

I'm copying my resolve:

 

ExchRate1 =
IF(
    ISBLANK(LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],EstadVentas[Date])),
         IF(
            ISBLANK(LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],DATEADD(EstadVentas[Date],-1,1,DAY))),
            LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],DATEADD(EstadVentas[Date],-2,1,DAY)),
            LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],DATEADD(EstadVentas[Date],-1,1,DAY))),
            LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],EstadVentas[Date])
            )

View solution in original post

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @pelucapampa

 

You may try to use LOOKUPVALUE Function. For example: 1-7 in 'day of week' column is from Monday to Sunday.

1.png

You may get the 'Lookup' column by calculated column:

Lookup =
IF (
ISBLANK ( LOOKUPVALUE ( 'Rate'[Rate], Rate[day of week], Sales[day of week] ) ),
MAXX ( FILTER ( Rate, Rate[day of week] > Rate[day of week] - 1 ), Rate[Rate] ),
LOOKUPVALUE ( 'Rate'[Rate], Rate[day of week], Sales[day of week] )
)

If it is not your case, please share some data sample and expected output. 

 

Regards,

Cherie

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

Thanks for your reply, I resolved!!!

I'm copying my resolve:

 

ExchRate1 =
IF(
    ISBLANK(LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],EstadVentas[Date])),
         IF(
            ISBLANK(LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],DATEADD(EstadVentas[Date],-1,1,DAY))),
            LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],DATEADD(EstadVentas[Date],-2,1,DAY)),
            LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],DATEADD(EstadVentas[Date],-1,1,DAY))),
            LOOKUPVALUE('Exchange Rate'[Precio],'Exchange Rate'[Fecha],EstadVentas[Date])
            )

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.