Forum Discussion
DAX Measure help - GL Account Adjustment
Hello Community -
I am working on a Trial Balance where we have intercompany elimination entries. Below is the current measure for one of the Accounts (4300) that has intercompany activity:
O&E Interco 4200 =
CALCULATE(
SUM('helper GLBalances_ByYearMonth'[Closing Balance]) * -1,
FILTER(
'helper GLBalances_ByYearMonth',
'helper GLBalances_ByYearMonth'[Account Code] = "4300" &&
'helper GLBalances_ByYearMonth'[Company Code] >= "00010" &&
'helper GLBalances_ByYearMonth'[Company Code] <= "09001"
)
)
This measure gets me the exact value that I need to see for the intercompany elimination for account 4300. My issue comes in the next part. I need to offset that intercompany elimination in account 4200, which has no activity, but it is just a holding account that will total the inverse of the measure shared above. I have tried multiple different options, but I cannot get a measure to work to pull in the inverse of the 4300 elimination entry to show up for GL Account 4200.
Can someone please provide some insight or assistance on how I can acheive this 'adjusting' entry with a DAX measure?
Thank you Community!
Ryan F.
6 Replies
- Ritaf1983Super User
Hi RyanFiting
Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.
- ryan_b_fitingPost Patron
Thanks Ritaf1983 .
Below is a screen shot of what I am looking at now:
Account 4300 is a full intercompany eliminations account, so everything in that account is allocated to the interco elimination entry. However, account 4200 is more than just an elimination account, but it does contain the $125k (in the example above) in interco transactions, but also contains other values. The ultimate goal is to get the +$125k into the interco Eliminations on the Account Code line of 4200. Being we do not have each individual transaction in the warhouse table, we need to create a measure that can offset the value in account code 4300 each month.
- danextianSuper User
Hi RyanFiting,
Depending on the current filters, if your ta
You need to have a separate accounts table instead of having everything in one. This will simplify the calculations. For example, if there isn't a row for 4200 in your fact table for a given year, you cannot make it appear in a visual for that given year even if you assign a value to it using a measure. You can create one using DAX or M. Example DAX calculated table:
Accounts = DISTINCT('helper GLBalances_ByYearMonth'[Account Code])Once the account table is setup, create a a one-to-many single direction relationship from the Accounts[Account Code] to 'helper GLBalances_ByYearMonth'[Account Code]. You need to start using this new account column going forward.
Create this measure:
Account4200 = CALCULATE ( SUM ( 'helper GLBalances_ByYearMonth'[Closing Balance] ) * -1, Accounts[Account Code] = "4300", KEEPFILTERS ( 'helper GLBalances_ByYearMonth'[Company Code] >= "00010" && 'helper GLBalances_ByYearMonth'[Company Code] <= "09001" ) )To return this value along with other values, create another measure:
IF ( SELECTEDVALUE ( Accounts[Account Code] ) = "4200", [Account4200], [other value measure] )- ryan_b_fitingPost Patron
Thanks danextian there is a row for Account code 4200 in my fact table, but the total value in there is NOT equal to the offset, that 4200 account contains more in there than just the offset. And being this is at a summarized level, we do not have anyway to filter out the transactions that make up the offset. See below how the sample is:
So account 4200 contains the $125k, but also contains other values. The ultimate goal is toe get +$125k into the interco Eliminations on the Account Code line of 4200. Being we do not have each individual transaction in the warhouse table, we need to just create a measure that can offset the value in account code 4300 each month.
Hopefully that makes sense.
- AnonymousNot applicable
Hi, RyanFiting
May I ask if you have gotten this issue resolved? If it is solved, please share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
If it is not resolved, I hope you will provide the full .pbix file via OneDrive or SharePoint. Please be careful to remove all sensitive information and we will do our best to provide ideas for your issue.I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.