Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have different conditons that I want to match from the excel to powerbi query, below are those:
1. if table1[column1] = table2[column1] and table1[column2] = table2[column2] and if table[date] is in b/w 4 april 2019 and 30 march 2020 then pick up table2[column5] value and attach as a new column in table1.
2. If table1[column1] = table2[column1] and table1[column2] = table2[column2] and if table[date] is in b/w 4 april 2019 and 30 march 2020 then table1[column4] * table2[column5] value and attach as a new column in table1.
Now I tried using merge (left join) but somehow it gives duplicates rows and every calculation which was happening before gets incorrect becasue of the duplicates, I can do this with IF and logical conditons but problem is my spreedhseet contains 15000+ rows and it will not make any sense to write each line by line conditons for each of the following rows.
Does anyone has any better ideas for this?
Hi @Anmolgan ,
You can write m query with "each" to make automatic judgments in the advanced editor. You can refer to this case:
https://community.powerbi.com/t5/Desktop/M-Power-Query-help-for-table-merge-Conditional-Cross-Join/m...
Can you suggest me an example of doing it? will cross join will not pick up every values that involves? how can I implement if conditions inside of cross join??
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |