Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
19 | |
14 | |
14 | |
13 | |
12 |