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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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