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
chestercas
Helper I
Helper I

SUM + measure

Hi,
I need help for a really simple calcul but I don't find the answer... I tried many things.
I create a measure for DISTINCTCOUNT a value. And with this, I need to include the distinct count (with filter) and the total.
For example :

capture power bi.PNG
My measure "compte CC" =

DISTINCTCOUNT('Activites detaillees des consei'[Name])
And I need to DIVIDE to the total (ex for IDF FC : 6/69)
Attention : there's some filter to select (date/hour) and all is dynamic...
 
Can you help me please ...? I tried with SUM but it don't takes measure...
 
Thank you !
 
2 REPLIES 2
GabrielRomaoG
New Member

Hi,

you can try this to make the division:

 

VAR varCompteCC_all_Site = 

CALCULATE(
       [Complet CC],
       ALLSELECTED(Site)
)
RETURN
DIVIDE([Compte CC], varCompetCC_all_Site)

,
this CALCULATE with ALLSELECTED will ignore the context of the Site column and will return the total (69) for all Sites. 

Hi,
Thanks for your answer !
It doesn't works, I think it takes the same result of [Compte CC]. So the result is 1 (69/69 or 6/6...)

 

Finally I do it with Excel... Thank you

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.