Forum Discussion

naveen73's avatar
naveen73
Helper III
2 years ago

Relationship maybe needed”

Hi, I have a question on relationships. I have two fact tables and one dimension table. Then I created a relationship between each fact tables and the dimension table. Now when I make a pivot table and it says “Relationship maybe needed”.

Why is this? A link would be appreciated. I tried quite a few Youtube videos.

3 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    I assume you're using Excel. The issue is undoubtedly because you are trying to build a visual that can't leverage the relationships to cross filter. You should look at the diagram view in power pivot. Note the arrows on each relationship; they are important. They indicate which tables can cross filter other tables. Your dimension table can filter both fact tables, but the fact tables cannot filter the dimension table. If you try to use any columns from your fact tables in the rows, filters, columns of your pivot table, this can trigger this warning message. The message would be better to say "warning, you are trying to build a pivot that is not supported by your relationships". The error can also be triggered if you write a measure and place it in the wrong table. Best to put the measure in the table that is the source of the aggregated data. 

    • naveen73's avatar
      naveen73
      Helper III

      Hi Matt,

      Thanks for your response.

       

      Yes, this is in Excel.

       

      There are two fact tables and one dimension table. Both Fact tables have “Item” column and so does the dimension table (Items). What I want to do is to have a slicer in Excel and use the column name “label” in the Items table. As an aside, the Item column in Items table there just numbers while the Label column has names).

      In the Item of the two fact tables there are different Items

       

      You mentioned that “The error can also be triggered if you write a measure and place it in the wrong table. Best to put the measure in the table that is the source of the aggregated data.”

      I have not put a measure in place. Perhaps you could help me with that, please?

       

       

      Thanks,

       

      Naveen

       

  • MattAllington's avatar
    MattAllington
    Community Champion

    You should not use the item columns in your fact tables in your pivot. I suggest you hide them (from within power pivot). As long as you plug the label in rows and the amounts in the values section, it should work fine. Just make sure the amounts are loaded as numeric and not text