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.
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??
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 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |