Forum Discussion
How to create this calculated column (Power Query)
- Anonymous4 years ago
Anonymous Try this:
Calc_column=var Current_Year='Allocation'[Year]
var Current_Week='Allocation'[Week]
var Current_Person='Allocation'[Person]
var Current_Project='Allocation'[Project]
var tempTable=FILTER('TimeRegistered','TimeRegistered'[Year]=Current_Year&&'TimeRegistered'[Week]=Current_Week&&'TimeRegistered'[Person]=Current_Person&&'TimeRegistered'[Project]=Current_Project)
return SUMX(tempTable,[HoursRegistered])
- 4 years ago
Hi, Anonymous
In Power Query:
1. Merge Queries
2. Hold down the shift key to select multiple matching columns, and click OK
3. Aggregate
Result:
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Try this:
Calc_column=var Current_Year='Allocation'[Year]
var Current_Week='Allocation'[Week]
var Current_Person='Allocation'[Person]
var Current_Project='Allocation'[Project]
var tempTable=FILTER('TimeRegistered','TimeRegistered'[Year]=Current_Year&&'TimeRegistered'[Week]=Current_Week&&'TimeRegistered'[Person]=Current_Person&&'TimeRegistered'[Project]=Current_Project)
return SUMX(tempTable,[HoursRegistered])
- Anonymous4 years agoNot applicable
This works well! Thanks
I am wondering if its possible to do the same thing in Power Query? As I would like to filter the rows of this table using the new column created.
- v-angzheng-msft4 years agoCommunity Support
Hi, Anonymous
In Power Query:
1. Merge Queries
2. Hold down the shift key to select multiple matching columns, and click OK
3. Aggregate
Result:
Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.