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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.