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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Enrich a table with transactions looking at the table itself

Hi , I have a starting table with data (see below)

Now in this table I need to add calculated rows based on that table.

These rows need to be added every quarter

 

Any suggestions or any suggestions on the model used?

Capture2.JPG

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

Add a calculated column in Start Table.

Column1 =
VAR previousdate =
    CALCULATE (
        MAX ( 'Start Table'[Date] ),
        FILTER (
            ALL ( 'Start Table' ),
            'Start Table'[Date] < EARLIER ( 'Start Table'[Date] )
                && 'Start Table'[Company] = EARLIER ( 'Start Table'[Company] )
        )
    )
RETURN
    [Amount]
        - CALCULATE (
            SUM ( 'Start Table'[Amount] ),
            FILTER (
                ALL ( 'Start Table' ),
                'Start Table'[Company] = EARLIER ( 'Start Table'[Company] )
                    && [Date] = previousdate
            )
        )

1.png

 

Create a calculated table.

End Table =
UNION (
    SELECTCOLUMNS (
        'Start Table',
        "Company", 'Start Table'[Company],
        "Sector", 'Start Table'[Sector],
        "Deal Type", 'Start Table'[Deal Type],
        "Amount", 'Start Table'[Amount],
        "Date", 'Start Table'[Date],
        "Transactor", 'Start Table'[Transactor],
        "Type2", 'Start Table'[ Type2]
    ),
    SELECTCOLUMNS (
        FILTER ( 'Start Table', 'Start Table'[Date] = MAX ( 'Start Table'[Date] ) ),
        "Company", 'Start Table'[Company],
        "Sector", 'Start Table'[Sector],
        "Deal Type", 'Start Table'[Deal Type],
        "Amount", 'Start Table'[Column1],
        "Date", 'Start Table'[Date],
        "Transactor", "Revalue",
        "Type2", "Revaluation"
    )
)

2.png

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

Add a calculated column in Start Table.

Column1 =
VAR previousdate =
    CALCULATE (
        MAX ( 'Start Table'[Date] ),
        FILTER (
            ALL ( 'Start Table' ),
            'Start Table'[Date] < EARLIER ( 'Start Table'[Date] )
                && 'Start Table'[Company] = EARLIER ( 'Start Table'[Company] )
        )
    )
RETURN
    [Amount]
        - CALCULATE (
            SUM ( 'Start Table'[Amount] ),
            FILTER (
                ALL ( 'Start Table' ),
                'Start Table'[Company] = EARLIER ( 'Start Table'[Company] )
                    && [Date] = previousdate
            )
        )

1.png

 

Create a calculated table.

End Table =
UNION (
    SELECTCOLUMNS (
        'Start Table',
        "Company", 'Start Table'[Company],
        "Sector", 'Start Table'[Sector],
        "Deal Type", 'Start Table'[Deal Type],
        "Amount", 'Start Table'[Amount],
        "Date", 'Start Table'[Date],
        "Transactor", 'Start Table'[Transactor],
        "Type2", 'Start Table'[ Type2]
    ),
    SELECTCOLUMNS (
        FILTER ( 'Start Table', 'Start Table'[Date] = MAX ( 'Start Table'[Date] ) ),
        "Company", 'Start Table'[Company],
        "Sector", 'Start Table'[Sector],
        "Deal Type", 'Start Table'[Deal Type],
        "Amount", 'Start Table'[Column1],
        "Date", 'Start Table'[Date],
        "Transactor", "Revalue",
        "Type2", "Revaluation"
    )
)

2.png

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Michiel
Resolver III
Resolver III

Is there a specific reason for wanting to add rows to the table? If you want to calculate the Revaluation, it is a rather straightforward time intelligence calculation:

Valuation = SUM('Start Table'[Amount])

 

Valuation Last Quarter = CALCULATE([Valuation], DATEADD(Dates[Date], -3; MONTH))

 

Revaluation = [Valuation] - [Valuation Last Quarter]

 

Make sure to hookup 'Start Table' to a date table (Dates, in my example).

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.

Top Solution Authors
Top Kudoed Authors