Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Counting overlap between two tables

Hello Everyone, Having trouble getting a calculation result to render in a table and I am hoping someone can point out a glaring mistake I am making. First a little background about the data I ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous - It's failing on the SELECTCOLUMNS - try this:

     

    Owned Related Component = 
        var component_holdings = SELECTCOLUMNS(d_product_c,"ID", [access_id])
        var pack_components = SELECTCOLUMNS(d_pack_component_products,"ID", [access_id])
        var overlap = NATURALINNERJOIN(component_holdings,pack_components)
    
        RETURN
        COUNTROWS(overlap)