Forum Discussion
Table data link up question
- Anonymous3 years ago
Hi Ericwhv ,
The solution is simple, but it's a bit complicated to tell, and I'll try to make it clear.
1.Create a custom column in your truck schedule table.
2.Use the Merge Queries feature to join the two tables based on the Lane column.
3.Add a custom column in the merged table to filter out the rows that match your needs.
4.Use the Group By feature to group the data by Lane and Departure columns, and use the Sum aggregation function to calculate the total weight.
5.Finally, duplicate the truck schedule table, note that it is not a reference, and then merge it inside based on the Lane column and the Departure column.
6.This is the expected result.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you Stephen!
it could work
but when i create a customs column it come up with below error
[Expression.Error] We cannot convert the value null to type Logical.
i guess it is because of some schedule do not have any cargo ready like below, then, these row become am "Error" could you mind to tell me how get rid of these blank, i prefer to keep it, thx!
at the end, i cannot group it together, thank you.
Hi Ericwhv ,
The error message you are seeing is because the value in the column you are referencing is null, and Power BI is trying to convert it to a logical value To get rid of the blank rows, you can filter them out using the filter feature in Power Query. However, if you prefer to keep the blank rows, you can try using replace error/replace value to return BLANK when a meaningful value cannot be returned.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ericwhv3 years agoHelper II
Thank you Stephen
Yes, literally, there is some "Truck Schedule" are blank with no cargo can be move, so, it got an "Error"
I just grab these blank schdule out first, anyway, all good now, thank you so much for your help and time!!