Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I am trying to create relationships between tables based on a custom index. And get the message in the screenshot below.
I have already tried: clearing my cashe, switching between (1:*) and (*:1) relationships, switching the filter direction between single and both.
There can't be duplicates in any of the tables.
The tables contain data of this form:
I'd be happy to hear your recommendations!
Hi @Anonymous ,
First of all confirm that in those columns you don't have duplicated values that can be checked on the table view clicking on the column at the bottom left it refers how many values you have.
Also one thing that ussually give errors on the relationships is having blanks or null values on your columns.
Based on your screenshots it does not seem that you have it but only seeing a small part of the data.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHere is the situation in two tables that I want to create a relationship for.
There are 16 entires (one for each period), with the same combination of (ltpa_sv, site_id, comb_index) in the second table. I expected this to be the exact situation where a (1:*) relationship comes in. There are always 16 objects in the second table that share the same object in the first table. Is my thinking somehow wrong here?
Hi @Anonymous ,
If you have 16 entries for each period the you don't have unique values for each period you have many values for each period because the ID must be unique by row not by periods.
For this I advise you to create a bridge table with the unique values (the 16 you refer) and then make a relationship from that table to the other two.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI am already using a table with unique period values as you recomended.
In table 1 (which has the keys (ltpa_sv, site_id, comb_id, period) followed bycolumns with relevant values.
In table2 I isolated the unique combinations of ltpa_sv, site_id, comb_id). This second table is supposed to act as a bridge between all tables that use the comb_id. I want to add things like the probability that a combination is realized there. From this I want to to calculate Expected values of the values in table 1 by comb_id.
This is why I want to connect the two tables.
I know you have created the measures for the countrows if you can do me a favour and for the table 2 (the one that is bridge)
Can you place the combid column on a table visualization and then the countrows measure in the same visualization and see if everything returns 1.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI forgot to mention that I'm getting both tables from an sql server database in direct query mode.
From how they are generated I am sure that there are no duplicates or Null values in the columns relevant for this relationship.
Do you require more info to help here? What should I provide you?
To describe what the contents of my tables are:
one has multiple datasets for each combination of (model_parameters_id, site_id, comb_id):
for each period there is one entry for each scenario (apva_sv) that belongs to a scenario combination (comb_id):
The other table is a view that is created based on the here present data. It returns all distinct combinations of (model_parameters_id, site_id, comb_id).
Hi @Anonymous ,
Since you are in DQ mode you must try to do some test with measures, try the following:
Count = COUNTROWS(Table1)
I know that you refer that you are sure that this does not happen but never hurts to double check.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
104 | |
99 | |
97 | |
41 | |
38 |
User | Count |
---|---|
151 | |
123 | |
79 | |
73 | |
71 |