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 September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.