Forum Discussion
Combing graphs from 2 datasets on the same tab
The general consensus is to avoid many-to-many relationships where possible (it can wreak havoc in calculations...)
Can you not create lookup/dim tables as bridge tables between the different fact tables by linking common fields (and removing duplicate values to enable one-to many relationships)?
If you can provide sample fact tables with dummy data/values I will happily give it a try
My other issue is that I am trying create Current Year and Prior Year calculations. To do that I am having to link my date, to the date table which is many to one, then my slicers are year and month and sometimes quarter and those end up being many to many and after a bit it will not let me add anymore. Can you think of away around that? I am all ears. Thank you!
- PaulDBrown6 years ago
Community Champion
It would be very helpful if you could provide examples of your tables (even if they are only a few rows of dummy data and fake names for company etc). It will help to create a mock-up of the model.
As regards your last comment regarding the calendar table linked by date in a single-to many relationship to the other date field in the fact table, but the year or quarter slicers are many-to-many... I don’t follow you. If you have a good calendar table, with columns for Month, quarter, year etc and it is linked in a one-to many by the date fields, you can use the month,quarter, year columns in slicers without a problem: selecting a Year in slicer from the calendar table will filter the tables related by the group of dates in the same rows as the column you are filtering. It works beautifully, and that is one of the reasons It is recommended to use a calendar table (or any other bridge table for that matter). This is the way PBI is designed to work. By doing this, you are in effect creating the filter context common to all related tables, allowing for correct calculations between equivalent fields in different tables (for example, actuals in one table compared to target or forecast from another table
Does that make sense?- Anonymous6 years agoNot applicable
So you are saying I do not have to link the date, year, month and quarter fields from the data table to the calendar, just the date and it will work?
My company table looks like this, EWS, RMSC, INF, SCR, and ACR. All my data tables have some or all of those. My yard table is a list of cities where we have yards. Again the data tables have some or all of the yards depending on the data.
Does this answer your questions?
- PaulDBrown6 years ago
Community Champion
@reg169
That’s correct. It will work just by establishing a one-to-many relationship between the date field in your calendar table to your fact tables. The same applies for any other field you wish to filter tables by using bridge tables. That’s how PBI is designed to work
Thank you for the info on your tables. Can you please explain if they are values or columns?
As I understand it, you have a revenue table and a forecast table. What’s the third fact table. Also, what fields are common in each table?
I will try to create a basic mock-up with the info you provide to illustrate what I’m trying to explain