Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
How do I find max Valid from in the Interest table where Invoice date >= Valid from?
Invoice date = 2021-11-16 and I want to get row 2, Valid from 2021-11-15
Interest table
Any ideas?
Lotte
Solved! Go to Solution.
Try
Intrest Lookup Date =
MAXX (
FILTER ( ALL ( Table ), Table[Valid from] <= MAX ( Invoice[Invoice Date] ) ),
Table[Valid from]
)
Hi @LotteLaugesen
You can use
Intrest Lookup Date =
MAXX (
FILTER ( Table, Table[Valid from] <= MAX ( Invoice[Invoice Date] ) ),
Table[Valid from]
)
Hi tamerj1
Unfortunately I then get 2021-12-20 in return and not 201-11-15
But thanks anyway
Try
Intrest Lookup Date =
MAXX (
FILTER ( ALL ( Table ), Table[Valid from] <= MAX ( Invoice[Invoice Date] ) ),
Table[Valid from]
)
Same result - but thanks for trying 👍
Hi @LotteLaugesen
I'm getting correct results. See the screen shot. But I think it depends on your data model and relationships. Most probably you have a connected date table. Can you please send a screen shot of your data model with the relationships?
Thanks and have a nice day!
Here is my datamodel and contents of NFV Interest Rates:
And this is the calculation and result
Thanks for your time 🙂
@LotteLaugesen
Are you sure invoice date is of date data type? It looks like it is of text data type 🙂
I'm wondering why it looks like that, too...
But look here:
Check the data source from power query. Or if you don't mind can you please a sample data version of the file?
Sorry about all this - I had made the calculation as a new column in the Merge ARAP and SCF table and not as a new measure 🙈 So after changing that it works perfectly
Thanks for all you time
@LotteLaugesen , You can create a new measure
calculate(sum(Table[Intrest]), filter(Table, Table[Valid from] >= max(Invoice[Invoice Date]) ) )
Unfortunately it doesn't work. I get the sum of all interest
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |