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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Guys, how are you?
I'm having problems in calculating a new column to show a balance account with tax (the tax is 0.01%) accumulated day by day.
The table that I have:
Day | People | Ins | Outs |
16 | P1 | 1000 | |
20 | P1 | 500 | 5 |
16 | P2 | 850 | 50 |
20 | P2 | 30 |
with the column I need (it cam be measure, I don't mind)
Day | People | Ins | Outs | RESULT |
16 | P1 | 1000 | 1000,10 | |
20 | P1 | 500 | 5 | 1495,55 |
16 | P2 | 850 | 50 | 800,08 |
20 | P2 | 30 | 830,40 |
Ty guys!!
Solved! Go to Solution.
@Anonymous
Ohh sorry, a small mistake.
RESULT =
VAR FixedTax = 0.0001
VAR CurrentDay = 'Table'[Day]
VAR CurrentPersonTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[People] ) )
VAR TableOnAndBefore =
FILTER ( CurrentPersonTable, 'Table'[Day] <= CurrentDay )
RETURN
SUMX ( TableOnAndBefore, ( 'Table'[Ins] - 'Table'[Outs] ) * ( 1 + FixedTax ) )
Hi @Anonymous
please try calculated column
RESULT =
VAR FixedTax = 0.0001
VAR CurrentDay = 'Table'[Day]
VAR CurrentPersonTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[People] ) )
VAR TableOnAndBefore =
FILTER ( CurrentPersonTable, 'Table'[Day] <= CurrentDay )
RETURN
SUMX ( TableOnAndBefore, ( 'Table'[Ins] - 'Table'[Outs] ) * FixedTax )
Hi @tamerj1, Thank you for your replay, but, in this case, I the column "RESULT" brings only the difference and I need the value complete. Can you help me?
@Anonymous
Ohh sorry, a small mistake.
RESULT =
VAR FixedTax = 0.0001
VAR CurrentDay = 'Table'[Day]
VAR CurrentPersonTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[People] ) )
VAR TableOnAndBefore =
FILTER ( CurrentPersonTable, 'Table'[Day] <= CurrentDay )
RETURN
SUMX ( TableOnAndBefore, ( 'Table'[Ins] - 'Table'[Outs] ) * ( 1 + FixedTax ) )