Forum Discussion
Combining two GL Accounts under a new column with two different data points
Hello,
I have two GL accounts, one for $ amount salary and wages and another for hours for that position. I want to combine these two GL accounts into a single row while still having the two above columns separated. Is there a way I can achieve this?
- Anonymous2 years ago
Hi bmfokken
Here for your reference:
Here I create a set of sample:
Then click the new table:
Table 2 = VAR _vtable1 = FILTER ( SELECTCOLUMNS ( 'Table', "_AccountID1", 'Table'[AccountID], "_Position1", 'Table'[Position], "_Actual Amounts1", 'Table'[Actual Amounts], "_Actual Total Expenses1", 'Table'[Actual Total Expenses] ), [_Actual Total Expenses1] <> BLANK () ) VAR _vtable2 = SELECTCOLUMNS ( EXCEPT ( 'Table', _vtable1 ), "_AccountID2", 'Table'[AccountID], "_Position2", 'Table'[Position], "_Actual Amounts2", 'Table'[Actual Amounts] ) RETURN FILTER ( CROSSJOIN ( _vtable1, _vtable2 ), FIND ( [_Position1], [_Position2], 1, BLANK () ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi bmfokken
Here for your reference:
Here I create a set of sample:
Then click the new table:
Table 2 = VAR _vtable1 = FILTER ( SELECTCOLUMNS ( 'Table', "_AccountID1", 'Table'[AccountID], "_Position1", 'Table'[Position], "_Actual Amounts1", 'Table'[Actual Amounts], "_Actual Total Expenses1", 'Table'[Actual Total Expenses] ), [_Actual Total Expenses1] <> BLANK () ) VAR _vtable2 = SELECTCOLUMNS ( EXCEPT ( 'Table', _vtable1 ), "_AccountID2", 'Table'[AccountID], "_Position2", 'Table'[Position], "_Actual Amounts2", 'Table'[Actual Amounts] ) RETURN FILTER ( CROSSJOIN ( _vtable1, _vtable2 ), FIND ( [_Position1], [_Position2], 1, BLANK () ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.