Forum Discussion

snow87's avatar
snow87
Icon for Helper I rankHelper I
4 years ago
Solved

If there are multiple values, which do reports use?

I have data like this:

 

idreciperun
001blue1
002green1
003red1
001green2
002green2

 

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.)

6 Replies

  • It depends on which aggregation you use.  MIN/MAX/SELECTEDVALUE etc.

  • Let's say I have another table with color grades.

    idcolor grades
    001A
    002A
    003B

     

    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's avatar
      lbendlin
      Icon for Super User rankSuper 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's avatar
        snow87
        Icon for Helper I rankHelper 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.)