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
matthieu_rsu
Regular Visitor

Pareto - Equalities and ranking

Hello,

 

I've been on this subject for more than 6 hours and can't express the frustration on not solving this.
I'm trying to make a pareto chart, which works perfectly when I don't have equalities in my values. When this happens, the cumulative sum doesn't work.

Here is the measure :

Test =
IF(
    ISINSCOPE(Tabla_Proving_QA[Root cause classification]),
    VAR __AllselectedTIP = ALLSELECTED(Tabla_Proving_QA[Root cause classification])
   
    // Créer une colonne calculée pour le classement personnalisé avec un critère de déségalisation basé sur la colonne Index
    VAR _CompTable = ADDCOLUMNS(__AllselectedTIP, "@Sum", [RC Count], "@Rank", RANKX(__AllselectedTIP, [RC Count],, DESC, DENSE)+RAND()/100 + RAND()/10)
    VAR _CurrentSum = [RC Count]

    // Calcul du classement et de la somme en cours
    VAR _CurrentRank = MAXX(FILTER(_CompTable, [@Sum] = _CurrentSum), [@Rank])
   
    // Agréger les données pour le calcul du pourcentage cumulé
    VAR __CumuData = FILTER(_CompTable, [@Rank] <= _CurrentRank)
    VAR __Cumu = SUMX(__CumuData, [@Sum])
    VAR __Total = CALCULATE([RC Count], __AllselectedTIP)
    VAR __Result = DIVIDE(__Cumu, __Total)
   
    RETURN
       __Result)

matthieu_rsu_0-1701948384630.pngAs you can see, when the count is 103, I can't get the cumulative sum to work. I tried to implement a ranking system, which seems to work cause I get different values for all my lines.

But then, not working.

Thank you in advance for your help

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@matthieu_rsu 

Please check this video out: https://youtu.be/8aDSztj9pmU


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@matthieu_rsu 

Please check this video out: https://youtu.be/8aDSztj9pmU


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hello,

 

Thank you, solved my problem in 5 minutes. Which is awesome and at the same time makes me feel bad for wasting that much time before.

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.