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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HEW
Helper III
Helper III

Lookup value per date

Hi.

 

I am trying to create a table, where I show the cost price for the first day of the month. We have a table with all cost prices, pls. see below:

 

Price table   
Article no.Date startDate end Price 
101.01.201830.11.2021            12,00
101.12.202131.12.9999            15,00
201.01.201831.12.9999            22,00
301.01.201831.01.2022            25,00
301.02.202231.12.9999            26,00

 

And I would like to have a visual like below:

Visual:     
 nov-21dec-21jan-22feb-22% Dev
Article 1              12,00                15,00            15,00           15,0025%
Article 2              22,00                22,00            22,00           22,000%
Article 3              25,00                25,00            25,00           26,004%

 

I do have a date table as well and have tried a lot of different measures, but no one is working.

 

Any suggestions?

 

Thanks a lot in advance.

Helen

1 ACCEPTED SOLUTION
ERD
Community Champion
Community Champion

@HEW , you can use the measure below:

PricePerStartOfMonth =
VAR c_article = SELECTEDVALUE ( 'Table'[Article no.] )
VAR c_date = SELECTEDVALUE ( Dates[StartOfMonth] )
RETURN
    CALCULATE (
        MAX ( 'Table'[ Price ] ),
        'Table'[Article no.] = c_article,
        c_date >= 'Table'[Date start],
        c_date <= 'Table'[Date end]
    )

ERD_0-1646646235866.png

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.

I am a Ukrainian living in Ukraine. Please, help us to survive! Please, Ask your government to react!
Here are official ways you can support us financially (accounts with multiple currencies):
https://bank.gov.ua/ua/about/support-the-armed-forces

USD:
BENEFICIARY: National Bank of Ukraine
BENEFICIARY BIC: NBUA UA UX
BENEFICIARY ADDRESS: 9 Instytutska St, Kyiv, 01601, Ukraine
ACCOUNT NUMBER: 400807238
BENEFICIARY BANK NAME: JP MORGAN CHASE BANK, New York
BENEFICIARY BANK BIC: CHASUS33
ABA 0210 0002 1
BENEFICIARY BANK ADDRESS: 383 Madison Avenue, New York, NY 10017, USA
PURPOSE OF PAYMENT: for crediting account 47330992708

Accounts details for other currencies (EUR|GBP|CHF|AUD|CAD|PLN) can be found here: https://bank.gov.ua/ua/about/support-the-armed-forces

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

2 REPLIES 2
ERD
Community Champion
Community Champion

@HEW , you can use the measure below:

PricePerStartOfMonth =
VAR c_article = SELECTEDVALUE ( 'Table'[Article no.] )
VAR c_date = SELECTEDVALUE ( Dates[StartOfMonth] )
RETURN
    CALCULATE (
        MAX ( 'Table'[ Price ] ),
        'Table'[Article no.] = c_article,
        c_date >= 'Table'[Date start],
        c_date <= 'Table'[Date end]
    )

ERD_0-1646646235866.png

If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.

I am a Ukrainian living in Ukraine. Please, help us to survive! Please, Ask your government to react!
Here are official ways you can support us financially (accounts with multiple currencies):
https://bank.gov.ua/ua/about/support-the-armed-forces

USD:
BENEFICIARY: National Bank of Ukraine
BENEFICIARY BIC: NBUA UA UX
BENEFICIARY ADDRESS: 9 Instytutska St, Kyiv, 01601, Ukraine
ACCOUNT NUMBER: 400807238
BENEFICIARY BANK NAME: JP MORGAN CHASE BANK, New York
BENEFICIARY BANK BIC: CHASUS33
ABA 0210 0002 1
BENEFICIARY BANK ADDRESS: 383 Madison Avenue, New York, NY 10017, USA
PURPOSE OF PAYMENT: for crediting account 47330992708

Accounts details for other currencies (EUR|GBP|CHF|AUD|CAD|PLN) can be found here: https://bank.gov.ua/ua/about/support-the-armed-forces

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

It works perfectly!

 

Thanks a lot.

Helen

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.