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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
Lets assume I have table
ID Date Value
ID1 01.01.2022 10
ID1 01.02.2022 10
ID1 01.03.2022 20
ID1 01.04.2022 30
ID2 01.01.2022 20
Expected result - 50 (Value 30 for ID1 with date 1.04.2022 + Value 20 from ID2)
How to do that? Thank you in advance
Solved! Go to Solution.
Hi,
add a calculated column to your fact table:
IsLastDate :=
CALCULATE(
MAX(facTable[Date]),
factTable[ID] = EARLIER(factTable[ID]),
ALL(factTable[Date]),
ALL(factTable[Value])
) = factTable[Date]
then you can add a measure:
SumOfMax =
CALCULATE(
SUM(factTable[Value]),
factTable[IsLastDate]
)
Hi,
add a calculated column to your fact table:
IsLastDate :=
CALCULATE(
MAX(facTable[Date]),
factTable[ID] = EARLIER(factTable[ID]),
ALL(factTable[Date]),
ALL(factTable[Value])
) = factTable[Date]
then you can add a measure:
SumOfMax =
CALCULATE(
SUM(factTable[Value]),
factTable[IsLastDate]
)
Hi,
Can you do that without calculating a new column?
Here's the solution without a calculated column (kind of ;))
VAR tempTbl =
ADDCOLUMNS(
yourTable,
"@IsLastDate",
CALCULATE(
MAX(yourTable[Date]), yourTable[ID] = EARLIER(yourTable[ID]), ALL(yourTable)
) = yourTable[Date]
)
RETURN
SUMX(
FILTER(tempTbl, [@IsLastDate]),
[Value]
)
BR
Lukas
sure, but it's a little early for my brain to do it 😄
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |