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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
diogobraga2
Helper IV
Helper IV

Total aggregations are not adding up correctly for calculated measure.

 
2019-12-29_1250.pngEach academic year spans across about 18 months worth of data because applications starts to be accepted as early as 10 months before school starts. For example, academic year 2019-2020, applications start to be accepted as early as November 2018. Because academic year is not a regular 12 months year, the best way I found to align the dates to make comparison is creating the date adj, which is the result of the following calculation:  

 

 

apptime adj = if [academic year]="2016-2017" then Date.AddDays([apptime],1095) else if [academic year]="2017-2018" then Date.AddDays([apptime],730) else if [academic year]="2018-2019" then Date.AddDays([apptime],365) else [apptime]  

 

 

 
In order to compare previous year data to the current time, I first find the max current application date (not apptime adj):

 

 

Newest Date = MAX(application_count[apptime])

 

 

 

Then, filter application counts before the current time from previous years:

 

 

 

Total Apps Adj = if(application_count[apptime adj]<application_count[Newest Date],application_count[Total Apps],BLANK())

 

 

 

This returns the desired result, but the totals are off. Thanks in advance for you help. 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@diogobraga2 

 

You may use ISINSCOPE to add a measure.

Measure 2 =
IF (
    ISINSCOPE ( 'Dates Adj'[Month Year] ),
    SUM ( application_count[Total Apps Adj] ),
    SUM ( application_count[Total Apps] )
)

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft thanks for your help. I applied your solution, but it did not change anything.

Could you show me the solution in the actual .pbix file? 

 

2020-01-02_1404.png

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.