Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Good day all,
I've the following table - need daily cost to show cumulative savings after each new saving is added in
Stating at daily cost 100K and then that column should reduce each time new saving is added in
Sorted by Target Date
Solved! Go to Solution.
Hi @neees78
Please refer to attached sample file with the proposed solution. Hope this is what you're looking for
Daily Cost =
VAR StartingValue = 100000
VAR CurrentDate = SELECTEDVALUE ( 'Table'[Target Date] )
VAR CurrentID = SELECTEDVALUE ( 'Table'[ID] )
VAR SelectedTable = ALLSELECTED ( 'Table' )
VAR TableOnAndBefore =
FILTER (
SelectedTable,
VALUE ( 'Table'[Target Date] ) * 1000000 + 'Table'[ID]
<= VALUE ( CurrentDate ) * 1000000 + CurrentID
)
VAR AccumulatedSaving = SUMX ( TableOnAndBefore, 'Table'[New Savinng] )
RETURN
IF (
HASONEVALUE ( 'Table'[ID] ),
StartingValue - AccumulatedSaving
)
Hi @neees78
Please refer to attached sample file with the proposed solution. Hope this is what you're looking for
Daily Cost =
VAR StartingValue = 100000
VAR CurrentDate = SELECTEDVALUE ( 'Table'[Target Date] )
VAR CurrentID = SELECTEDVALUE ( 'Table'[ID] )
VAR SelectedTable = ALLSELECTED ( 'Table' )
VAR TableOnAndBefore =
FILTER (
SelectedTable,
VALUE ( 'Table'[Target Date] ) * 1000000 + 'Table'[ID]
<= VALUE ( CurrentDate ) * 1000000 + CurrentID
)
VAR AccumulatedSaving = SUMX ( TableOnAndBefore, 'Table'[New Savinng] )
RETURN
IF (
HASONEVALUE ( 'Table'[ID] ),
StartingValue - AccumulatedSaving
)
@neees78
Is new Saving a measure or a column? Are all columns coming from the same table?
Yes - all columns in single table , the "New Saving" is a column
the new saving is column - I just added it to explain - starts at 100K then it should reduce
yes - Title (txt) & ID (Number)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |