Forum Discussion

RicFischer's avatar
RicFischer
Helper I
5 years ago
Solved

Lookup values across two tables

I have three tables. Two have data and a third one is a lookup table to help the other two tables relate to each other.   In one table, I have a list of instructors with their qualifiations.   Ta...
  • RicFischer's avatar
    5 years ago

    I've solved my own problem. Cool! Here are the tables with the solution added. The key was to bring over a column from the lookup table so I could do calculations on it in this table. So, in InstructorQualfications, I added Units from the QualsFromUnits table. In TrainingProgress, I added Qualification from the QualsFromUnits table.

     

    There might have been a more efficient way to do this, but this was what I found worked.

     

    Suggestions, comments, feedback are welcome in an effort to teach me more stuff!

     

    Table name: InstructorQualifications

     

    Calculated columns:

    Unit =
    LOOKUPVALUE (
    QualsFromUnits[Unit],
    QualsFromUnits[Qualification], InstructorQualifications[Qualification]
    )

     

    Unit Passed =
    CALCULATE (
    MAX ( TrainingProgress[Grade] ),
    FILTER (
    TrainingProgress,
    TrainingProgress[Grade] = "S"
    && InstructorQualifications[Name] = TrainingProgress[Name]
    && InstructorQualifications[Unit] = InstructorQualifications[Unit]
    )
    )

     

    Table name: TrainingProgress

     

    Calculated columns:

    Qualification =
    LOOKUPVALUE (
    QualsFromUnits[Qualification],
    QualsFromUnits[Unit], TrainingProgress[Unit]
    )

     

    HasQualification = 
    CALCULATE (
    MAX ( InstructorQualifications[Qualification] ),
    FILTER (
    InstructorQualifications,
    TrainingProgress[Grade] = "S"
    && TrainingProgress[Name] = InstructorQualifications[Name]
    && TrainingProgress[Qualification] = InstructorQualifications[Qualification]
    )
    )