• 0

creating a rank with ties


Question

Hello, These codes only gives me ties ranks for only first and last total, can someone help me create a rank with ties using these codes. 
 

Dim TotaledRecords = From p In db.Assessments Where p.Term = cboterm.Text And p.Year = cboyear.Text Select p Order By p.Subject, p.Total Descending Dim previousSubject As String = "" Dim previousTotal As Integer = 0 Dim position As Integer = 0 For j = 1 To TotaledRecords.Count If TotaledRecords.ToList(j - 1).Subject <> previousSubject Then previousSubject = TotaledRecords.ToList(j - 1).Subject previousTotal = TotaledRecords.ToList(j - 1).Total position = 1 Else If previousTotal <> TotaledRecords.ToList(j - 1).Total Then position += 1 End If End If TotaledRecords.ToList(j - 1).Position = position

 

onlin.png

Link to comment
https://www.neowin.net/forum/topic/1349524-creating-a-rank-with-ties/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thread Locked. 

 

Please note that Neowin will not do your homework/assignment for you. Members are more than  happy to help if there's something that you've started and need some pointers with. See below!

 

  Quote

#1 WE WILL NOT DO YOUR HOMEWORK FOR YOU.
See below...

#2 WE WILL NOT DO YOUR HOMEWORK FOR YOU.
While I don't think anyone here will refuse to help a struggling student, a certain amount of offence is taken when you try to take advantage of our help to get your homework done without putting in any effort yourself. If you copy and paste an assignment without evidence that you've attempted it yourself, you're likely to get hostile responses (see here).
 
 #2a Show Your Work
If you're struggling with an assignment, show us what you've done so far (or at least the relevant portion). If we can see what you've done, we're going to be able to help you more easily!

Expand  

Asking for help with your assignments...

  • Like 1
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Mozilla really needed to focus on their core product for a while now. I will not mourn the death of pocket or AI garbage. One thing they don't do that I believe they should is advertise more, and not just to their core audience, especially their additional services. Let people know they actually exist.
    • Is this like tailscale?
    • I had no idea you could do this, thanks for the heads up!
    • Bonkers, really, when you think about the resources at Meta’s disposal.
    • You can now use Gemini in Google Forms to summarize responses by David Uzondu Over the last few months, Google has been aggressively pushing its Gemini AI into every corner of its Workspace apps, like generating entire documents from a prompt in Google Docs or creating fully editable charts in Sheets. Now, the company has set its sights on Google Forms. The latest update introduces a feature that uses Gemini to summarize text-based responses automatically. For any form with short-answer or paragraph questions, a new "Summarize responses" button will appear in the Responses tab once you collect more than three entries. Clicking it prompts Gemini to read the form's title, questions, and all the submitted text to spit out a summary of the key themes. Though Google bills this as a fresh expansion into Forms, we have actually had some Gemini intelligence in the app for a bit through the "Help me create a form" button. That feature, which drafts questions for you, was rolled out through the company's Workspace Labs program. For those unaware, Workspace Labs is basically Google's public testing ground, available in select countries, for new, and sometimes unproven, AI tools before a general release. Once a summary is generated, you can copy it to use elsewhere or hit "Retry" to see if Gemini comes up with a different take. If new responses roll in after you have generated a summary, you can click a "Refresh" button to update it with the latest data. For now, this feature is only available in English, and to use it, you'll need access to a paid Google Workspace plan, such as Business Standard, Business Plus, Enterprise Standard, or Enterprise Plus. It is also available to customers who pay for the Google AI Pro and Ultra plans or specific Gemini Education add-ons. The feature has started rolling out gradually, for Rapid Release domains, and will begin rolling out for Scheduled Release domains on June 26.
  • Recent Achievements

    • Week One Done
      Tech Dogs earned a badge
      Week One Done
    • Enthusiast
      computerdave91111 went up a rank
      Enthusiast
    • Week One Done
      Falisha Manpower earned a badge
      Week One Done
    • One Month Later
      elsa777 earned a badge
      One Month Later
    • Week One Done
      elsa777 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      531
    2. 2
      ATLien_0
      273
    3. 3
      +FloatingFatMan
      200
    4. 4
      +Edouard
      199
    5. 5
      snowy owl
      138
  • Tell a friend

    Love Neowin? Tell a friend!