Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hey,
first hello, it´s my first post here 🙂
I have my ('Order'[Product]) which has been sold on ('Order'[DateNew]).
Now I need to find ('Price(2)'[Old price]) based on date between ('Price(2)'[Old from]) and (Price(2)'[New from]).
If not found then newest ('Price(2)'[Old price]).
I created this formula, but SUM is not best expression.
Any ideas?
Solved! Go to Solution.
Hi @jakub_klocek ,
Is the result in your screenshot the result you want? I have test by your data and code. I think it works well if you build a calculated column.
Order Table:
Price(2) Table:
Add a calcualted column in Order Table.
VK Neu =
CALCULATE (
SUM ( 'Price(2)'[Old price] ),
FILTER (
'Price(2)',
'Price(2)'[Old from] <= 'Order'[DateNew]
&& 'Price(2)'[New from] >= 'Order'[DateNew]
&& 'Price(2)'[Product] = 'Order'[Product]
)
)
Output:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@jakub_klocek , are there two table Price and Price(2) ?
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Sorry, my bad, only one Price(2) Table.
Hi @jakub_klocek ,
Is the result in your screenshot the result you want? I have test by your data and code. I think it works well if you build a calculated column.
Order Table:
Price(2) Table:
Add a calcualted column in Order Table.
VK Neu =
CALCULATE (
SUM ( 'Price(2)'[Old price] ),
FILTER (
'Price(2)',
'Price(2)'[Old from] <= 'Order'[DateNew]
&& 'Price(2)'[New from] >= 'Order'[DateNew]
&& 'Price(2)'[Product] = 'Order'[Product]
)
)
Output:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 64 | |
| 31 | |
| 26 | |
| 26 |