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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. 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
Super User
Super User

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
Super User
Super User

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.