Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello!
I want to determine a value (Amount) based on the maximum date (Valid From). The measure should be exerminable per ID and per Currency.
Table 1:
ID | Name | Currency |
1 | Example 1 | EUR |
2 | Example 2 | USD |
3 | Example 3 | EUR |
Table 2:
ID | Valid From | Amount |
1 | 01.01.2010 | 10 |
1 | 01.01.2017 | 20 |
1 | 01.01.2020 | 30 |
2 | 01.01.2010 | 15 |
2 | 01.05.2017 | 25 |
3 | 01.01.2010 | 8 |
Tables are connected in 1:n via ID.
I have two visuals, one per Currency (Table 1) and one per ID (Table 1/2). Ideally I want to use the same measure to get: the "current" Amount of Table 2.
So if the Slicer is set to e.g. 01.04.2017 I want to Have:
Visual 1 (per ID):
and Visual 2 (per Currency):
I was able to create following measure in Table 2:
Current Amount =
VAR TargetDate = MAX(table2[Valid From])
RETURN
CALCULATE(MAX(table2[Amount]),FILTER(table2,table2[Valid From] = TargetDate))
This works for Visual 1, but not for 2. I dont know how I should sum up. I tried SUMX, DISTINCT, VALUES, and so on ... but I'm not lucky.
Is it possible to create one measure (or at least two) to achieve this?
Thank you very much! 🙂
Solved! Go to Solution.
Hi @sibe123
please try
Current Amount =
SUMX (
VALUES ( Table1[ID] ),
MAXX (
TOPN ( 1, CALCULATETABLE ( Table2 ), Table2[Valid From] ),
Table2[Amount]
)
)
Hi @sibe123
please try
Current Amount =
SUMX (
VALUES ( Table1[ID] ),
MAXX (
TOPN ( 1, CALCULATETABLE ( Table2 ), Table2[Valid From] ),
Table2[Amount]
)
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
7 | |
4 | |
3 |
User | Count |
---|---|
15 | |
14 | |
12 | |
10 | |
9 |