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
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
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.