Forum Discussion

BarryFletcher's avatar
BarryFletcher
Icon for Helper III rankHelper III
2 years ago
Solved

Match & Sum values from another table?

Hi all,   I am looking for help please?   I have 2 tables - 1 table has a column called Line number. My second table also has a column called line number but it could have 5 rows with that lne n...
  • audreygerred's avatar
    2 years ago

    Hi! Your first table, the one with name and line number (line number being unique) is your dimension table. Your second table (the one with multiple rows with the same line number) is your fact table. Create a join between the two tables. In the model tab, you should see a line go from dim to fact and see a 1 by the dim table, a * by the fact table (indicating a 1 to M  join) and an arrow pointing at the fact table (which signifies that the dim table will filter the fact table. Next, create a measure for the length like this Length = SUM('YourFactTableName'[Length]). Add a table visual (or whatever viz you want) and put in the line number from your dim table and the measure you created.