Forum Discussion
Power BI is creating duplicate entries
- Anonymous4 years ago
Hi Anonymous ,
This is because you have multiple [start date] for a single client in Table A. When you put the [start date] to Table B, Power BI cannot determine which date this client corresponds to. In this case you will need to add an index column for both tables and use the index column as a one to one relationship instead.
Best Regards,
Jay
Hi Anonymous ,
This is because you have multiple [start date] for a single client in Table A. When you put the [start date] to Table B, Power BI cannot determine which date this client corresponds to. In this case you will need to add an index column for both tables and use the index column as a one to one relationship instead.
Best Regards,
Jay
Hi Jay thanks for answering, I'm still pretty new to BI so apologies if this is an obvious question, but what data would I be putting in the index columns?
- Anonymous4 years agoNot applicable
Hi Anonymous ,
If the order of the data in the two tables is one-to-one, you can directly add the index column in the Power BI Editor.
If not, you could create a rank column in both tables based on the date and project columns for each Client. Then use this rank column as relationship.
rank = TableA[client]&"_"&RANKX(FILTER('TableA','TableA'[client]=EARLIER('TableA'[client])),'TableA'[date],,ASC) rank = TableB[client]&"_"&RANKX(FILTER('TableB','TableB'[client]=EARLIER('TableB'[client])),'TableB'[project],,ASC)Best Regards,
Jay