In my PowerBI desktop, I have table that is calculated from over other tables with a structure like this:
Input table: