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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vanessa250919
Helper IV
Helper IV

Sum for an measure

Hello,

 

I try to have a new measure for make a sum for a measure : 

Nbre_postes_pourvoir = CALCULATE(SUM(T_Convention[DE_A_Engager]))/ DISTINCTCOUNT(T_Convention[Key_Suivi])
The total is 11 = 1223 / 117 like in my measure but I need to make a sum for this measure Nbre_postes_pourvoir is possible? 
 
Thanks for help
 

Vanessa250919_0-1698221248252.png

 

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @Vanessa250919 ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

EylesIT
Resolver II
Resolver II

@Vanessa250919, here is my suggested solution.

 

You want the measure [Nbre_postes_pourvoir] to be calculated for each Nom_enterprise, and then summed up to get the total. To achieve this, your measure needs to group the data up by Nom_enterprise, calculate the Nbre_postes_pourvoir, and then sum up the results. The SUMX function allows you to do this.

 

Please try changing the DAX for [Nbre_postes_pourvoir] to this:

 

 

Nbre_postes_pourvoir =
    SUMX(
        VALUES(T_Convention[Nom_enterprise]),
        CALCULATE(SUM(T_Convention[DE_A_Engager]))
        /
        DISTINCTCOUNT(T_Convention[Key_Suivi])
    )

 

 

 Is this what you are looking for?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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