Forum Discussion
If there are multiple values, which do reports use?
I have data like this:
| id | recipe | run |
| 001 | blue | 1 |
| 002 | green | 1 |
| 003 | red | 1 |
| 001 | green | 2 |
| 002 | green | 2 |
How does PowerBI handle id 001? Will a report use blue or green for the recipe? Or will it double count? I need to be able to get results by recipe, but sometimes the recipe changes between runs.
(I'm sure this has been asked before, but I have no idea what search terms to use.)
see attached
6 Replies
- lbendlin
Super User
It depends on which aggregation you use. MIN/MAX/SELECTEDVALUE etc.
- snow87
Helper I
Let's say I have another table with color grades.
id color grades 001 A 002 A 003 B If I want to count how many As the green recipe produced - will it be one or two? Will blue be zero or one?
Thanks.
- lbendlin
Super User
we're getting into the discussion of table relationships. Which of your tables is "fact" and which is "dimension" ? Is there a 1-to-many relationship, or a many-to-many relationship?
- snow87
Helper I
The first table, with the recipes and the runs is fact, and the second table with the color grades is dimension, but this is my first time doing this so they might not be set up as strictly as a professional would. They have a many-to-one relationship. (The ids appear multiple times in the first table, and once in the second table.)