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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
frankhofmans
Helper IV
Helper IV

Search value between two dates

hi PBI experts,

 

i have 2 tables (with >100k rows)

 

table 1: orders per provider

 

Client IDOrder dateOrder nr.
00101-03-2022111
00102-04-2022112
00210-04-2022113
00313-04-2022114
00420-04-2022115
00403-05-2022116
00427-05-2022117
00502-06-2022118

 

table 2: provider overview

 

StartEndClient IDPurchase price
01-01-202201-01-999900120
01-01-202201-03-202200225
01-03-202201-01-999900227
01-01-202201-01-999900325.5
01-01-202201-04-202200425.7
01-04-202201-05-202200426
01-05-202201-01-999900426.3
01-01-202201-01-999900525.8

 

if i want to have the purchase price for provider 004 on 20-04-2022, it has to be 26 (the price between 01-04-2022 and 01-05-2022). So i want to have the following results:

 

Client IDOrder dateOrder nr.Purchase price
00101-03-202211120
00102-04-202211220
00210-04-202211327
00313-04-202211425.5
00420-04-202211526
00403-05-202211626.3
00427-05-202211726.3
00502-06-202211825.8

 

Does anyone have a solution for this?

 

Thanks in advance,

 

Regards,

 

Frank

1 ACCEPTED SOLUTION
NickolajJessen
Solution Sage
Solution Sage

Hey Frank,

try something like this:

I created a dimension table for the customer as is good practice and create a measure as so:

NickolajJessen_0-1657011917808.png

 

If this post solves your problem, accept it as a solution
Appreciate your kudos

 

View solution in original post

1 REPLY 1
NickolajJessen
Solution Sage
Solution Sage

Hey Frank,

try something like this:

I created a dimension table for the customer as is good practice and create a measure as so:

NickolajJessen_0-1657011917808.png

 

If this post solves your problem, accept it as a solution
Appreciate your kudos

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.