Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I am facing a special case with Power BI Desktop.
Here is the situation, I have two tables with some columns :
+--------------+ +--------------+
| | | |
| | | |
| TableA | | TableB |
| | | |
| | | |
| | | |
++-------------+ ++-------------+
| |
+---+columnA +--+columnA
| |
+---|columnB +--+columnDate
| |
+---|columnC +--+column...
|
+---+column...
I want to create a relation between these two tables, with this condition :
TableA.columnA = TableB.columnA and TableB.columnDate between TableA.columnB and TableA.columnC
I am a beginner on Power BI and I have no idea of how to do this..
Could you help me ?
I didn't find element which could help me in what you sent 😕
I have found this topic :
+ this page : https://msdn.microsoft.com/en-us/query-bi/m/table-selectrows
So, if I follow them, I should have a formula like this ?
Table.SelectRows(TableA, (TableA) => TableA[columnA] = TableB[columnA] and TableB[columnDate] >= TableA[columnB] and TableB[columnDate] <= TableA[columnC])[TableA]
I don't have the possibility to test this formula before tomorrow. However, will this only display TableA columns or TableB's too ?
Up
Does someone have an idea ? I'm still searching on the net but I can't find how to join the tables...
I'm on an idea currently. The idea is merging the two table (left join), and then apply a filter to fulfill the condition (a date between the two others). I can merge the table via edit queries, but how to apply the filter then ?
Hi Alpha427,
About create and manage relationships in power bi, please refer to this documentation: https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships. In addtion, if you want to merge tables in power bi, please refer to this documentation: https://docs.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data#combine-data.
Regards,
Jimmy Tao
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |