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! Learn more

Reply
Corleen
Regular Visitor

Sum by Maximum Month

Good day

 

I have created the following measures

 

Expenditure = CALCULATE(sum(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this gives me sum of the balance where account type is  equal to Expenditure

 

Highest Expenditure = CALCULATE(max(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this gives me the max balance of expenditure 

 

 

Highest Expenditure Month = LOOKUPVALUE(Balance[Bookkeeping Month],Balance[Balance],[Highest Expenditure]) ~ this gives me the month in which the highest expenditure happened 

 

What I want to do is create a measure ~ to sum the  all the balance if it is Expenditure and in the Highest Month 

 

Thank you

 

 

 

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

@Corleen

 

You can try this measure and show the result in Card visual.

 

HighMonthSum =
VAR HighestMonth = [Highest Expenditure Month]
RETURN
    CALCULATE (
        [Expenditure],
        FILTER ( Balance, Balance[bookkeeping month] = HighestMonth )
)

 

Best Regards,
Herbert

View solution in original post

3 REPLIES 3
v-haibl-msft
Microsoft Employee
Microsoft Employee

@Corleen

 

You can try this measure and show the result in Card visual.

 

HighMonthSum =
VAR HighestMonth = [Highest Expenditure Month]
RETURN
    CALCULATE (
        [Expenditure],
        FILTER ( Balance, Balance[bookkeeping month] = HighestMonth )
)

 

Best Regards,
Herbert

Yes I want to put it in a Card Visual

 

Works perfectly

 

Thank you

 

 

Corleen
Regular Visitor

Good day

 

I have the following measures

 

Expenditure = CALCULATE(sum(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this sums all the balance values where account type is equal to Expenditure

 

Highest Expenditure = CALCULATE(max(Balance[Balance]), Balance[Account Type] = "Expenditure") ~ this gives me the maximum balance where account type = Expenditure

 

Highest Expenditure Month = LOOKUPVALUE(Balance[Bookkeeping Month],lBalance[Balance],[Highest Expenditure]) ~ this gives me the month (201509) which have the highest Expenditure 

 

I want to create a measure that sums the Balance's for Expenditure and is in the Highest Expenditure Month

 

Thank you

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.

Top Solution Authors