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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GalrioSamoel
New Member

Cumulative Revenue by Region Not Calculating Correctly When Selecting a Single Customer

Hi Community 

I am working on a subscription revenue report in Power BI

My data model contains:

Customers (CustomerID, Regio)

Invoices (InvoiceDate, InvoiceAmount)

Date table connected to InvoiceDate

Also I have a matrix visual:

Rows: Region → Month

Values: Monthly Revenue + Cumulative Revenue

 

My current cumulative measure works fine until a user selects a single customer from a slicer. Then, it only accumulates revenue for that one customer not the whole region.

 

This is my current measure:

Cumulative Revenue =

CALCULATE(

SUM(Invoices[InvoiceAmount]),

FILTER(

ALL(Date[Date]),

Date[Date] <= MAX(Date[Date])

)

)

I need to Keep cumulative revenue working by Region, even when a single customer is selected.

 

Any advice on fixing this? Thank you! 

1 ACCEPTED SOLUTION
Ahmed-Elfeel
Solution Sage
Solution Sage

Hi @GalrioSamoel,

 

The issue happens because Customer slicer filters flow into your measure so Cumulative Revenue only calculates for the selected customer.


So you should remove the CustomerID filter while still keeping Region filter and report date filters:

Cumulative Revenue by Region =
VAR MaxVisibleDate =
    MAX ( Date[Date] )
RETURN
CALCULATE (
    SUM ( Invoices[InvoiceAmount] ),
    FILTER (
        ALLSELECTED ( Date[Date] ),
        Date[Date] <= MaxVisibleDate
    ),
    REMOVEFILTERS ( Customers[CustomerID] )  -- Important
)

 

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Kedar_Pande
Super User
Super User

@GalrioSamoel 

 

Cumulative Revenue =
CALCULATE(
SUM(Invoices[InvoiceAmount]),
FILTER(
ALL(Date[Date], Customers[CustomerID]),
Date[Date] <= MAX(Date[Date])
)
)

 

 

Ahmed-Elfeel
Solution Sage
Solution Sage

Hi @GalrioSamoel,

 

The issue happens because Customer slicer filters flow into your measure so Cumulative Revenue only calculates for the selected customer.


So you should remove the CustomerID filter while still keeping Region filter and report date filters:

Cumulative Revenue by Region =
VAR MaxVisibleDate =
    MAX ( Date[Date] )
RETURN
CALCULATE (
    SUM ( Invoices[InvoiceAmount] ),
    FILTER (
        ALLSELECTED ( Date[Date] ),
        Date[Date] <= MaxVisibleDate
    ),
    REMOVEFILTERS ( Customers[CustomerID] )  -- Important
)

 

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Thanks Ahmed it worked perfectly 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.