Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

New Calculated Column with ins, outs and Tax Rate

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:

DayPeopleInsOuts
16P11000 
20P15005
16P285050
20P230 

 

with the column I need (it cam be measure, I don't mind)

DayPeopleInsOutsRESULT
16P11000 1000,10
20P150051495,55
16P285050800,08
20P230 830,40

 

Ty guys!!

1 ACCEPTED 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 ) )

 

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

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 )
Anonymous
Not applicable

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 ) )

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.