Skip to main content

A student can take an exam (e.g., SAT/ACT) multiple times. I'd like to be able to get the score for the Nth time (not necessarily first/last) the student took the exam. This can easily be shown using a Table Calculation (screenshot), but I'd like to be able to use it in calculations. For example, show me the average of SAT scores for students' 3rd time taking the exam:

 

Sequence Using Calculated Field (LOD)? 

Is this possible using ONLY a calculated field? I know it can be done at the data source level (SQL, etc.) but really hoping to find a way using LOD...

 

Any help is appreciated.

4 respostas
  1. 27 de fev. de 2023, 22:10

    @James Kim​ 

    This could be easily created in Tableau Prep. You can upvote for the idea to include partition formula in Tableau Desktop:

    https://community.tableau.com/s/idea/0874T000000HGThQAO/detail

     

    In Tableau Prep, you can use:

    Test Rank

    {PARTITION [STUDENT_ID],[TEST]:{ORDERBY [DATE] ASC:ROW_NUMBER()}}

    @James Kim​ This could be easily created in Tableau Prep. You can upvote for the idea to include partition formula in Tableau Desktop:https://community.tableau.In Tableau Desktop, you would need to create a self join of your data:

    imageThen you can create a calc field like:

    Test Number:

    {FIXED [Student Id],[Test],[Date]:COUNT([TEST (Extract1)])}

    Attached you will find the workbook.

     

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000