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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
niculeica
Frequent Visitor

Need Running Total to ignore Year filter

Hi, community,

 

Having some troubles making Running Total ignore Year slicer. I've read a couple of similar threads, however, I'm still missing something 😞

 

So I have a Transactions table and a Period table based on it [Calendar(Min,Max)]. I've used the below formula to display Running totals per each period, but if I select a specific year in Year filter, the Running total starts with the first period of that year (it's cutting out anything before, not summing it up). I've tried with ALLEXCEPT('_Period'[_Year]) or even with ALL('_Period') and same result (Year field belongs to Period table as well).

 

Any idea what I could go for here?

 

_Revenue running total in Period =
CALCULATE(
    SUM('TransactionsbySegment'[_Revenue]),
    FILTER(
        CALCULATETABLE(
            SUMMARIZE('_Period', '_Period'[_Period Sort], '_Period'[Period]),
            ALLSELECTED('_Period')
        ),
        ISONORAFTER(
            '_Period'[_Period Sort], MAX('_Period'[_Period Sort]), DESC,
            '_Period'[Period], MAX('_Period'[Period]), DESC
        )
    )
)
1 ACCEPTED SOLUTION
mh2587
Super User
Super User

_Revenue running total in Period = //Try this one
CALCULATE(
    SUM('TransactionsbySegment'[_Revenue]),
    FILTER(
        ALL('_Period'),
        '_Period'[_Period Sort] <= MAX('_Period'[_Period Sort])
    )
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



View solution in original post

2 REPLIES 2
mh2587
Super User
Super User

_Revenue running total in Period = //Try this one
CALCULATE(
    SUM('TransactionsbySegment'[_Revenue]),
    FILTER(
        ALL('_Period'),
        '_Period'[_Period Sort] <= MAX('_Period'[_Period Sort])
    )
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Much appreciate it, @mh2587 !🤝 It did work.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.