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
Vick143
Frequent Visitor

How to Calculate sum for previous reporting period

Hi,

I have to create either a Measure or Calculated Column to get result displayed in Total Commission Previous Reporting Period but I have to be able to filter it. Reporting Periods basically gives snapshot of data, they are not countunious value so I created Rank column to get Total Commission for previous availabe reporting period based on specific Contract#. Contract#s are unique within a specific reporting period. Following table is just an example, my model is much, thousands of different Contracts and ten Reporting periods (attached below).

 

Thank you in advance.

 

Reporting Period Contract#Total CommisonRankTotal Commission Previous Reporting Period
202310888$1255$120
202310777$1335$184
202309888$1204$160
202309777$1844$199
202308888$1603$130
202308777$1993$188
202307888$1302$142
202307777$1881 
202306888$1421 

 

ReportingPeriod

202112
202203
202206
202209
202212
202303
202306
202309
202310
202311

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Vick143 ,

 

not sure if i fully get you, try to add a calculated column like:

Column = 
MAXX(
    FILTER(
        data, 
        data[Contract#]=EARLIER(data[Contract#])
            &&data[Reporting Period] = EARLIER(data[Reporting Period] )   -1
    ),
    data[Total Commison]
)

 

it worked like:

FreemanZ_0-1700025534072.png

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Vick143 ,

 

not sure if i fully get you, try to add a calculated column like:

Column = 
MAXX(
    FILTER(
        data, 
        data[Contract#]=EARLIER(data[Contract#])
            &&data[Reporting Period] = EARLIER(data[Reporting Period] )   -1
    ),
    data[Total Commison]
)

 

it worked like:

FreemanZ_0-1700025534072.png

for my requirement, Instead of using Reporting Period I used Rank and it worked. Thank you very much.

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.