Forum Discussion

ryand009's avatar
ryand009
Frequent Visitor
1 year ago
Solved

Values from Unrelated table

Hello   Part of my model is .. I need to count the number of StudentID's in Table_B that have matching values in Table_C based on a Regdate range from Table_B. I've got the folowing Dax expr...
  • vivek31's avatar
    1 year ago

    HI ryand009,

    you can use a VALUES instead of LOOKUPVALUE function

    EVALUATE
    ROW(
        "j",
        CALCULATE(
            COUNTROWS(Table_B),
            FILTER(Table_B,
                    Table_B[RegDate] >= DATE (2025, 1, 1) &&
                    Table_B[RegDate] <= DATE (2025, 1, 31)),
                    Table_B[StudentID] IN VALUES ( Table_C[StudentID])))