Forum Discussion
problem to connect tables
I am trying to get together testing results for multiple environments.
+----------+--------------+------------+
| TEST | Result env A | Date |
+----------+--------------+------------+
| test 1 | 10 | 2018-07-01 |
| test 1 | 15 | 2018-07-02 |
| test 2 | orange | 2018-07-03 |
+----------+--------------+------------+
+----------+--------------+------------+
| TEST | Result env B | Date |
+----------+--------------+------------+
| test 1 | -10 | 2018-07-01 |
| test 1 | -20 | 2018-07-02 |
| test 2 | monday | 2018-07-01 |
+----------+--------------+------------+
OUTPUT should be someting like this (only taking most actual result)
+----------+--------------+--------------------+
| TEST | Result env A | Result env B |
+----------+--------------+--------------------+
| test 1 | 15 | -20 |
| test 2 | orange | monday |
+----------+--------------+--------------------+
when I was working with one table I use calculated columns
https://stackoverflow.com/questions/51437962/select-row-with-max-value-per-category-power-bi to get max date and work with that
But I dont know how to put these tables together, I was trying relationships between tables (adding some table to have relationship 1:N), was trying to merge tables but no luck.
Any tip how to process it ?
Thanks
- Anonymous7 years ago
nevermind i solve it on source side of the data
3 Replies
- v-yulgu-msftMicrosoft Employee
Hi Anonymous ,
What do you mean "only taking most actual result" when generating the desired output? Please provide more description about your requirement. How to calculate result? How to establish relationship? What should be considered to filter records?
Regards,
Yuliana Gu
- AnonymousNot applicable
sorry I guess my description was little confusing
I have multiple tables (each for some environment) which are being constantly updated with the new test result and time stamp.
My desired output would be to connect these tables but only take for each test case (group by TEST) most recent result ( highest timestamp / date )
so in the output table will TEST 1 with one column representing result with biggest date, another column representing second table for TEST 1 with max date
- AnonymousNot applicable
nevermind i solve it on source side of the data