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
Anonymous
Not applicable

Efficiency problem

Hi, I have an issue with the efficiency of a solution to a problem. Does anyone have improvement suggestions to improve speed?

I have the basic settings in Power BI desktop, but the solution (see below) to the problem (see below) is far too slow. My data usually ranges from 50 000 - 1 000 000 rows, so looping "find" is probably too slow. Any suggestions for a more efficient solution?

 

Problem

For people familiar with accounting: I would like to see where do entries from one account go to. As in "other side of a journal entry".

Basically the data is this as in the table below:

 

AccountIdentifierSum
1000565100€
110056520€
1200565-120€
1200572-101€
130057250€
140057250€
15005721€
1600577-5000€
16005775000€

 

Of course, there will be hundreds of thousands of lines. But the rule is:

1. All Identifiers (565 for example) equal out to zero in the Sum-field. 

Goal:

I would like to create a dashboard, where i can filter account 1200 and it would present to me the following:

 

Account 
1000100€
110020€
130050€
140050€
15001€

 

How do i start to create this? So the function would be like this:

Filter all Identifiers that are in account 1200 (565 & 572 in this case).

If account <> 1200 then SUM the values of these identifiers and show which account they are assigned to

 

Solution:

image.png

 

 

2 ACCEPTED SOLUTIONS

Hi @Anonymous ,

 

check this out.

PBIX

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create an additional table using dax below:

Account = DISTINCT('Table'[Account])

Then create slicer based on the new 'Account' table and create measure using dax below:

Result = 
VAR SelectedAccount = SELECTEDVALUE(Account[Account])
RETURN
CALCULATE(SUM('Table'[Sum]), FILTER(ALL('Account'), 'Account'[Account] <> SelectedAccount))

Capture.PNG

You can also refer to pbix attached.

 

Community Support Team _ Jimmy Tao

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
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create an additional table using dax below:

Account = DISTINCT('Table'[Account])

Then create slicer based on the new 'Account' table and create measure using dax below:

Result = 
VAR SelectedAccount = SELECTEDVALUE(Account[Account])
RETURN
CALCULATE(SUM('Table'[Sum]), FILTER(ALL('Account'), 'Account'[Account] <> SelectedAccount))

Capture.PNG

You can also refer to pbix attached.

 

Community Support Team _ Jimmy Tao

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

 

Hi @Anonymous ,

 

check this out.

PBIX

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

Hi,

 

Actually this has a small issue with it. If i slice multiple items, it shows the other side of the journal entry, yes, but it also shows the accounts i have selected. So the inverse-selection doesnt work with multiple items. Is there a fix for this?

 

Thank you!

Anonymous
Not applicable

Hi,

 

Thank you, elegant and efficient! I need to further look into this, as I really don't understand why the relationships are required in the background and if I would like to add a second column to the filter and the table (for example account name) it does break down.

 

But these are issues that should be solved by me now that I have the core.

 

Thank you!  

 

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.