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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.