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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Jers19
New Member

Calculated column

Hello,

I have two tables (without relation)

  • table of sales with two columns
    • ID
    • date of sales
  • table of prices with four columns
    • ID
    • validity start date
    • expiry date
    • price

I'd like to add a calculated column in the "sales" table with the price that was valid.

I try with "filter" but I have a result only when the sales date is egal to the validity start date 😞

Thank you for your help

1 ACCEPTED SOLUTION
tamerj1
Community Champion
Community Champion

Hi @Jers19 

please try

Price =
MAXX (
FILTER (
Price,
Price[ID] = Sales[ID]
&& Price[Validity Start Date] <= Sales[Date of Sales]
&& Price[Expiry Date] >= Sales[Date of Sales]
),
Price[Price]
)

View solution in original post

2 REPLIES 2
tamerj1
Community Champion
Community Champion

Hi @Jers19 

please try

Price =
MAXX (
FILTER (
Price,
Price[ID] = Sales[ID]
&& Price[Validity Start Date] <= Sales[Date of Sales]
&& Price[Expiry Date] >= Sales[Date of Sales]
),
Price[Price]
)

Hello @tamerj1 

Thank you so much.  It works.

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.