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
harshagraj
Post Partisan
Post Partisan

To calculate Index on one column

Hi all, I have below data and I need measure calcualtion to achieve skill index on Column USER_DN level that is 1.33.
Index calculations = Average(Final_User_Rating)/Average(MANAGER_EXPECTATIONS)
I need to achieve 1.33 [(2+1+1)/(1+1+1)]


USER_DNCOMPETENCY_L3_NAMEFinal_User_RatingMANAGER_EXPECTATIONSIndex
AbdTableau212
AbdPower BI111
AbdExcel111
1 ACCEPTED SOLUTION

Hi @harshagraj ,

So in your table the index result should be (2+1+2)/(1+1+2) = 1.25 right?

If so, try like this measure:

Index =
VAR _ra =
    CALCULATE (
        SUM ( 'SA USER_RATING'[Final_User_Rating] ),
        ALLEXCEPT ( 'SA USER_RATING', 'SA USER_RATING'[USER_DN] )
    )
VAR _ex =
    CALCULATE (
        SUM ( 'SA USER_RATING'[MANAGER_EXPECTION] ),
        ALLEXCEPT ( 'SA USER_RATING', 'SA USER_RATING'[USER_DN] )
    )
RETURN
    DIVIDE ( _ra, _ex, BLANK () )

index.png

 

Best Regards,
Yingjie Li

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

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@harshagraj try this measure

 

Avg Measure = 
DIVIDE ( SUM ( Table[Final User Rating] ), SUM ( Table[Manager Expectations] ) )

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k thank you for replying. I tried this 

SA User LOD = DIVIDE(SUM('SA USER_RATING'[Final_User_Rating]),SUM('SA USER_RATING'[MANAGER_EXPECTATIONS]))
This works when i take the user only but when i put the competancy it splits. I need to agg on User level. Below is the screen shot.Capture.JPG

@harshagraj 

you can add ALL function to get the result

Measure 2 = 
var rating=CALCULATE(sum('Table (3)'[RATING]),all('Table (3)'))
var expectation=CALCULATE(sum('Table (3)'[EXPECTATION]),ALL('Table (3)'))
return DIVIDE(rating,expectation)

 1.PNG





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

Proud to be a Super User!




Hi @ryan_mayu thanks for responding. Unfortunately it is not working,. If we just take the data seperately as above then it works..but in actual scenario it doesn't.
I am calculating Skill Index based on Final User Rating Column and Manager Expectation. 
Final User Rating column is again a calculated column. 

Final_User_Rating =
IF('SA USER_RATING'[MANAGER_ADJUSTMENTS]=0||ISBLANK('SA USER_RATING'[MANAGER_ADJUSTMENTS]),
'SA USER_RATING'[USER_RATINGS],
'SA USER_RATING'[MANAGER_ADJUSTMENTS])
With the solution u provided i am getting 0.21 as Skill Index.
SA User LOD =
Var a = CALCULATE(SUM('SA USER_RATING'[Final_User_Rating]),ALL('SA USER_RATING'))
Var b = CALCULATE(SUM('SA USER_RATING'[MANAGER_EXPECTATIONS]),ALL('SA USER_RATING'))
Return
DIVIDE(a,b)




tempsnip.png

Hi @harshagraj ,

So in your table the index result should be (2+1+2)/(1+1+2) = 1.25 right?

If so, try like this measure:

Index =
VAR _ra =
    CALCULATE (
        SUM ( 'SA USER_RATING'[Final_User_Rating] ),
        ALLEXCEPT ( 'SA USER_RATING', 'SA USER_RATING'[USER_DN] )
    )
VAR _ex =
    CALCULATE (
        SUM ( 'SA USER_RATING'[MANAGER_EXPECTION] ),
        ALLEXCEPT ( 'SA USER_RATING', 'SA USER_RATING'[USER_DN] )
    )
RETURN
    DIVIDE ( _ra, _ex, BLANK () )

index.png

 

Best Regards,
Yingjie Li

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

@harshagraj 

please provide the sample data of this.

 





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

Proud to be a Super User!




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.