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

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

Reply
angelc
New Member

calculate total outflow per month

CALCULATE(
SUM(Transactions[Amount]),
FILTER(
Transactions,
Transactions[Amount] < 0 &&
MONTH(Transactions[date]) = MONTH(Bank_Calendar[Date])
)
)

can anyone correct this for me?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @angelc ,

First of all, many thanks to @some_bih  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1710726267462.png

2.Create the calendar table.

vjiewumsft_1-1710726287274.png

3.Create the connection between two tables.

vjiewumsft_2-1710726297226.png

4.Create the measure to calculate the total.

 

Total Per Month = 
VAR sel_mon = SELECTEDVALUE(Bank_Calendar[Date])
RETURN
CALCULATE(
    SUM('Transactions'[Amount]),
    FILTER(
        'Transactions',
        'Transactions'[Amount] < 0 &&
        MONTH('Transactions'[Date]) = MONTH(sel_mon) &&
        YEAR('Transactions'[Date]) = YEAR(sel_mon)
    )
)

 

5.Drag the measure into the table visual. The result is shown below.

vjiewumsft_3-1710726352691.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @angelc ,

First of all, many thanks to @some_bih  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1710726267462.png

2.Create the calendar table.

vjiewumsft_1-1710726287274.png

3.Create the connection between two tables.

vjiewumsft_2-1710726297226.png

4.Create the measure to calculate the total.

 

Total Per Month = 
VAR sel_mon = SELECTEDVALUE(Bank_Calendar[Date])
RETURN
CALCULATE(
    SUM('Transactions'[Amount]),
    FILTER(
        'Transactions',
        'Transactions'[Amount] < 0 &&
        MONTH('Transactions'[Date]) = MONTH(sel_mon) &&
        YEAR('Transactions'[Date]) = YEAR(sel_mon)
    )
)

 

5.Drag the measure into the table visual. The result is shown below.

vjiewumsft_3-1710726352691.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

some_bih
Super User
Super User

Hi @angelc 

Order is important, if you do not have already it

1. Create Date / Calendar table - link

2. Create connection for Date and Fact table - link

3. v2 for measure 


CALCULATE(
SUM(Transactions[Amount]),
FILTER(
Transactions,
Transactions[Amount] < 0 &&

)
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






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.

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.