Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
I_NeedMorePower
Helper III
Helper III

How To Link Two Different Accounts (Asset Vs Depreciation)

Hello power people!

 

I have in my AX 2012 a "MainAccount" table,

in this table there are accounts for assets and accounts for depreciation of the assets.

I want to create a table visual in Power BI that have a column for assets and it's total amount and a column for deprciation accounts and their total.

So it's like an asset account vs its depreciation account

 

What is the proper way to deal with this?

I tried to make a view for assets accounts and a view for depreciation accounts and then I created a depreciation account reference column in the asset view and made a many-to-many relationship between the two views with cross reference, but didn't work well when I change the date on the date slicer.

 

any advice would be appreciated!

 

Thanks in advance!

1 ACCEPTED SOLUTION

hi  @I_NeedMorePower 

For your case, you could just try this way:

Step1:

Use a date table as a link table to create a relationship between assets trans table and depreciation trans table.

1.JPG

 

Step2:

Create  three measure as below:

Asset Amount = SUM('assets trans table'[Amount])+0

Deprectiation Amount = SUM('depreciation trans table'[Amount])+0

Net = [Asset Amount]-[Deprectiation Amount]

 

Result:

2.JPG3.JPG

and  here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@I_NeedMorePower , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Without looking at data really difficult to tell.

You can use summarize or summarize and union

Yeah sure, here is an example I made in excel:

Join Issue 2.PNG

 

There are 3 tables: assets trans table (in blue), depreciation trans table (in purple) and linking table (in black)

the green tables represents the objective i am trying to reach.

I did manage to do the first green objective table by connecting the the 2 tables with the linking table

but my issue is when I have a date slicer filter and then choose a from day that has depreciation transactions but has no assets transactions.

 

the result I get is in the red table, even though there are deprectiation trans in the date slicer period choosen, it doesn't appear in the result table, becuase the linked asset id has no transactions at that time, so both of them disapears.

 

How can I get the data to appear as the 2nd green objective table?

 

sorry for the length.

 

 

hi  @I_NeedMorePower 

For your case, you could just try this way:

Step1:

Use a date table as a link table to create a relationship between assets trans table and depreciation trans table.

1.JPG

 

Step2:

Create  three measure as below:

Asset Amount = SUM('assets trans table'[Amount])+0

Deprectiation Amount = SUM('depreciation trans table'[Amount])+0

Net = [Asset Amount]-[Deprectiation Amount]

 

Result:

2.JPG3.JPG

and  here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your detailed reply!

 

It really did the job!

but can I know if there is a way to hide the rows if both amounts of asset and depreciation were 0?

 

appreceiated!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.