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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
LotteLaugesen
Helper V
Helper V

Problem with running total

Hi 

 

Can anybody tell me what's wrong with my running total? Why doesn't it aggregate when I have different Currency LCU?
Can anybody tell me how to solve it? When I remove Currency LCU there is no problem.

LotteLaugesen_0-1657188292870.png

My calculation:
LotteLaugesen_1-1657188459130.png

 

BR 

Lotte

 
 
11 REPLIES 11
Anonymous
Not applicable

Hi @LotteLaugesen ,

 

Please use ALLEXCEPT() function on [Current LCU]

Acc. DKK Amount =
VAR RT =
    IF (
        [DKK] <> BLANK (),
        CALCULATE (
            'Misc calc'[DKK],
            ALLEXCEPT ( 'table', 'table'[Current LCU] ),
            FILTER (
                ALLSELECTED ( 'Dim Calendar' ),
                'Dim Calendar'[Date] <= MAX ( 'Dim Calendar'[Date] )
            )
        )
    )
RETURN
    RT

 

Best Regards,

Jay

Hi @Anonymous 

 

Unfortunately it just made it worse 😉

Anonymous
Not applicable

Hi @LotteLaugesen ,

 

Please share pbix so that we could test formula.

 

Best Regards,

Jay

tamerj1
Super User
Super User

HI @LotteLaugesen 
Try to add ALL ( TableNam[Currency LCU] ) inside the CALCULATE function.

Hi @tamerj1 

 

Thanks - It almost works 🙂

The first 2 lines are adding up, but below you can see that 2 other lines are not

LotteLaugesen_0-1657201181081.png

Have you got any more other ideas?

 

@LotteLaugesen 

In this case use

ALLSELECTED ( TableNam[Currency LCU] ) inside the CALCULATE function.

@tamerj1 

LotteLaugesen_0-1657202077140.png

My calculation looks like this now, but it doesn't help 😞

 

@LotteLaugesen 

please try

Acc. DKK Amount =
VAR RT =
    IF (
        [DKK] <> BLANK (),
        CALCULATE (
            [DKK],
            ALLSELECTED ( FT_ARAP_Invoices ),
            REMOVEFILTERS ( 'Dim Calendar' ),
            'Dim Calendar'[Date] <= MAX ( 'Dim Calendar'[Date] )
        )
    )
RETURN
    RT

@tamerj1 thank you for your time, but it didn't make any difference.

The final result is correct so right now I will go with this 😉

@LotteLaugesen 
Last trial

Acc. DKK Amount =
VAR CurrentDate =
    MAX ( 'Dim Calendar'[Date] )
VAR RT =
    IF (
        CurrentDate <> BLANK ()
            && [DKK] <> BLANK (),
        CALCULATE (
            [DKK],
            ALLSELECTED ( FT_ARAP_Invoices ),
            REMOVEFILTERS ( 'Dim Calendar' ),
            'Dim Calendar'[Date] <= MAX ( 'Dim Calendar'[Date] )
        )
    )
RETURN
    RT

Thanks @tamerj1 but it didn't help

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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