Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have these two tables
Item | _Purchase |
A | |
B |
Item_No | Entry_Type | QTY |
A | Sale | 10 |
A | Purchase | 10 |
B | Sale | 10 |
I made a new column to change the second table into this:
Item_No | Entry_Type | QTY | _PurchFlag |
A | Sale | 10 | |
A | Purchase | 10 | A |
B | Sale | 10 |
I'd like to get the first table to look like this
Item | _Purchased |
A | TRUE |
B | FALSE |
I want to ask the Table,
Which ITEMS exist in the _PurchFlag field?
and for every item that exists in the field, change it to TRUE in the other table.
@jasonwq This looks like it might run into circular reference errors at some stage. Do you have a DimItem table? If you do, use that in a table visual in Power BI and you should be able to easily combine the two tables with measures rather than columns. What else is in the first table? Is Item unique in the first table? It looks to me like _Purchase should be a MEASURE:
_Purchase = IF( COUNTROWS ( FILTER ( Table2, Table2[Entry] = "Purchase") > 1, TRUE, FALSE)
https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_11.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
User | Count |
---|---|
101 | |
90 | |
78 | |
70 | |
69 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |