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
jvilocura
New Member

Carry over the amount from prior days

Hello everyone, 

 

I'm here to ask for your assistance on how can I carry over the amount from the last transaction date?
For example, 11/26/2024 amt will carry over to let's say 12/02/2024. Is that possible?

 


The dataset or table below has one-to-many relationship with my Date table.

jvilocura_0-1733189515123.png

If you need anything, please let me know. I'm quite new to this.

 

Thank you in advance!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from FreemanZ , please allow me to provide another insight:

Hi, @jvilocura 

Regarding your question, I have created the following sample data:

vlinyulumsft_0-1734429340086.png

vlinyulumsft_1-1734429340088.png

vlinyulumsft_2-1734429369926.png

Secondly, I created the following calculated column in my date table:

vlinyulumsft_3-1734429369932.png

Column =
IF (
    'my Date'[Date] = DATE ( 2024, 12, 2 ),
    CALCULATE (
        SUM ( 'Table'[Amt] ),
        FILTER ( 'Table', 'Table'[Date] = DATE ( 2024, 11, 26 ) )
    )
)

Below is the final result:

vlinyulumsft_4-1734429392296.png

Of course, if there are multiple dates that need to be carried forward, you can also try using the SWITCH() function. Here is a simple example:

Column2 =
SWITCH (
    'my Date'[Date],
    DATE ( 2024, 12, 2 ),
        CALCULATE (
            SUM ( 'Table'[Amt] ),
            FILTER ( 'Table', 'Table'[Date] = DATE ( 2024, 11, 26 ) )
        ),
    DATE ( 2024, 12, 3 ),
        CALCULATE (
            SUM ( 'Table'[Amt] ),
            FILTER ( 'Table', 'Table'[Date] = DATE ( 2024, 11, 25 ) )
        ),
    BLANK ()
)

Here's my final result, which I hope meets your requirements.

vlinyulumsft_5-1734429427604.png

Here is the relevant documentation:

 SWITCH function (DAX) - DAX | Microsoft Learn

 

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

Thanks for the reply from FreemanZ , please allow me to provide another insight:

Hi, @jvilocura 

Regarding your question, I have created the following sample data:

vlinyulumsft_0-1734429340086.png

vlinyulumsft_1-1734429340088.png

vlinyulumsft_2-1734429369926.png

Secondly, I created the following calculated column in my date table:

vlinyulumsft_3-1734429369932.png

Column =
IF (
    'my Date'[Date] = DATE ( 2024, 12, 2 ),
    CALCULATE (
        SUM ( 'Table'[Amt] ),
        FILTER ( 'Table', 'Table'[Date] = DATE ( 2024, 11, 26 ) )
    )
)

Below is the final result:

vlinyulumsft_4-1734429392296.png

Of course, if there are multiple dates that need to be carried forward, you can also try using the SWITCH() function. Here is a simple example:

Column2 =
SWITCH (
    'my Date'[Date],
    DATE ( 2024, 12, 2 ),
        CALCULATE (
            SUM ( 'Table'[Amt] ),
            FILTER ( 'Table', 'Table'[Date] = DATE ( 2024, 11, 26 ) )
        ),
    DATE ( 2024, 12, 3 ),
        CALCULATE (
            SUM ( 'Table'[Amt] ),
            FILTER ( 'Table', 'Table'[Date] = DATE ( 2024, 11, 25 ) )
        ),
    BLANK ()
)

Here's my final result, which I hope meets your requirements.

vlinyulumsft_5-1734429427604.png

Here is the relevant documentation:

 SWITCH function (DAX) - DAX | Microsoft Learn

 

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

FreemanZ
Super User
Super User

hi @jvilocura ,

 

it is more advisible to have daily amount in the data table. 

With measure (or calculated column, intuitive but really adivisible), it is easy to do cumulative calculations. 

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.