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

Getting highest increase in test score

Hi All,

I have velow data. I want to get the name of that student who have shown hightest increase in his 4th test as compared to 1st test. I also want to know the % of increase achieved by that student by comparing 1st test score & 4th test score. 

 

Thanks in advance.

 

Student nameTestScore
A1

50

A2

40

A390
A470
B130
B220
B350
B495
C130
C240
C350
C460
D180
D240
D370
D460
E150
E220
E390
E480

 

5 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@harshadrokade add following measure to achieve it:

 

Sum Score = SUM ( Score[Score] )

Score Diff = 
VAR __score1st = CALCULATE ( [Sum Score], Score[Test] = 1 )
VAR __score4th = CALCULATE ( [Sum Score], Score[Test] = 4 )
VAR __diff = __score4th - __score1st
RETURN
DIVIDE ( __diff, __score1st )

Student Rank = RANKX ( ALLSELECTED ( Score[Student name] ), [Score Diff], , DESC ) 

 

and here it the output, tweak it as you see fit

 

parry2k_0-1641062098721.png

 

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.

View solution in original post

ALLUREAN
Solution Sage
Solution Sage

Hi, @harshadrokade 

 

Check this:

https://www.dropbox.com/s/qvygfk6v6mev9rg/Getting%20highest%20increase%20in%20test%20score%20%28allu...

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

All measures are in the attached pbix file.

 

Picture1.png

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

harshadrokade
Post Partisan
Post Partisan

Hi @Jihwan_Kim @ALLUREAN @parry2k 

 

With all of your help, I could create the measure that gives me the % of the increase/decrease in test 4 over test 1. 

When I put that measure in a table against the Student name, it gives the correct % increase/decrease however when I am trying to get the top student name out of that measure, it is giving me only top first student name correctly but when I try to find top second student name, it gives me the top first student name only.

 

I am using below measure to get the top 1st which is working well-

Top first student name =
MAXX (
TOPN (
1,
values ('Student name'[Student name] ),
CALCULATE ('Student name'[Compare%]),DESC
),
'Student name'[Student name])
 
I am getting Top first name only when I try to get the top second student name with below measure
 
Top first student name =
MAXX (
TOPN (
2,
values ('Student name'[Student name] ),
CALCULATE ('Student name'[Compare%]),DESC
),
'Student name'[Student name])
 
I can't upload the pbix file due to restrictions-

View solution in original post

parry2k
Super User
Super User

@harshadrokade your original question was asked and a solution was provided. The new question you asked is something totally different and the solution I provided is not suitable for it. You should accept a solution on this thread and create a new post for the 2nd question.

 

Follow us on LinkedIn and subscribe to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@harshadrokade your original question was asked and a solution was provided. The new question you asked is something totally different and the solution I provided is not suitable for it. You should accept a solution on this thread and create a new post for the 2nd question.

 

Follow us on LinkedIn and subscribe to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.

harshadrokade
Post Partisan
Post Partisan

Hi @Jihwan_Kim @ALLUREAN @parry2k 

 

With all of your help, I could create the measure that gives me the % of the increase/decrease in test 4 over test 1. 

When I put that measure in a table against the Student name, it gives the correct % increase/decrease however when I am trying to get the top student name out of that measure, it is giving me only top first student name correctly but when I try to find top second student name, it gives me the top first student name only.

 

I am using below measure to get the top 1st which is working well-

Top first student name =
MAXX (
TOPN (
1,
values ('Student name'[Student name] ),
CALCULATE ('Student name'[Compare%]),DESC
),
'Student name'[Student name])
 
I am getting Top first name only when I try to get the top second student name with below measure
 
Top first student name =
MAXX (
TOPN (
2,
values ('Student name'[Student name] ),
CALCULATE ('Student name'[Compare%]),DESC
),
'Student name'[Student name])
 
I can't upload the pbix file due to restrictions-
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

All measures are in the attached pbix file.

 

Picture1.png

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


ALLUREAN
Solution Sage
Solution Sage

Hi, @harshadrokade 

 

Check this:

https://www.dropbox.com/s/qvygfk6v6mev9rg/Getting%20highest%20increase%20in%20test%20score%20%28allu...

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




parry2k
Super User
Super User

@harshadrokade add following measure to achieve it:

 

Sum Score = SUM ( Score[Score] )

Score Diff = 
VAR __score1st = CALCULATE ( [Sum Score], Score[Test] = 1 )
VAR __score4th = CALCULATE ( [Sum Score], Score[Test] = 4 )
VAR __diff = __score4th - __score1st
RETURN
DIVIDE ( __diff, __score1st )

Student Rank = RANKX ( ALLSELECTED ( Score[Student name] ), [Score Diff], , DESC ) 

 

and here it the output, tweak it as you see fit

 

parry2k_0-1641062098721.png

 

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.

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.