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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Audrey_ADAPEI35
Frequent Visitor

Problem with total

Hello,

 

I've been trying for a while to resolve this measure. Can you help me?

I want to calculate a measure that estimate the average cost of a "place" for each month et a total of year.

 

 JanvierFevrierMarsAvrilMaiJuinJUilletAoûtSeptOctTOTAL
Réel254 897293 704335 793 277 280264 968324 731220 378220 085311 416249 2532752 504 €
[81 - Agréments]6464646464646464686868
[266 - Coût net /agrément)398345895247433241405074344334394580366540 478 €
 Agrément (ratio)64646464646464646868648
Coût net à la place total39824589524643324140507334433438457936654247 €

 

As for now, I show in my report the first 3 lines (in pink). For each month, it works fine but the total is incorrect as I wanted him to divide the total of "charges" by the maximum value of "agrément".

266- Cout net à la place = DIVIDE([1- Réel],[81-Agrément])
-> [1- Réel] is the sum of a column of my financial date
-> [81- Agrément] is the
VAR MaxDate = MAX('Agréments'[Date])
RETURN
CALCULATE(
    SUMX('Agréments','Agréments'[Agréments]),
    'Agréments'[Date] = MaxDate)
 

SO  I've been trying to have a measure that sum each month (lines in yellow) : it nows calculates an average (by month) instead of a total.

Coût net à la place total =
SUMX(
        VALUES(Comptes),
        DIVIDE([TEST1], [Agréement (ratio)])
    )
Where [Agréement (ratio)] is SUMX('Agréments','Agréments'[Agréments])
(for this one, ChatGPT helped me but the former ones diden't work either).

 

The expected answer is 42 492 €.

What am I missing?

 

Thank you very much for your answer !!!

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Audrey_ADAPEI35 ,

 

Add a new measure with the following code:

Coût net à la place total Overall =
        SUMX(VALUES(Table[Month]),
         [Coût net à la place total]
    )

 

This will pick up the value of your last measure and just sum it across the months


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

2 REPLIES 2
Audrey_ADAPEI35
Frequent Visitor

Thank you very much ! It works! 🙂 Have a great day !

MFelix
Super User
Super User

Hi @Audrey_ADAPEI35 ,

 

Add a new measure with the following code:

Coût net à la place total Overall =
        SUMX(VALUES(Table[Month]),
         [Coût net à la place total]
    )

 

This will pick up the value of your last measure and just sum it across the months


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.