Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

If value not in list, create rows with missing values

This needs a little bit of information.   I have a list of user IDs. I also have 20 modules that an user can be associated with, each module with a number of sessions that can be counted.   I cur...
  • v-yuta-msft's avatar
    7 years ago

    Anonymous ,

     

    You can create an external table with complete UserID and Module:

     

     

    Then merge the two tables using left outer join and expand columns:

     

     

    Finally, replace null with 0:

     

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.