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
Solle
Helper III
Helper III

Get Total Value for whole Portfolio in Matrix

Hi, 

I am trying to show a portfolios total such that I am able to calculate a positions amount of the total portfolio. 

I currently have a matrix that shows top 10 as per below:

Solle_0-1663928185449.png

Then in the column not written over, I want to show the percentage. But at first I tried to generate a column showing me this portfolios total value in each row, since then it would be easy to divide them. 

OBS! I have a slicer for date and portfolio. 

My current DAX is :

Total MV Ultimo Portfolio = SUMX(FILTER('Samlet Data', 'Samlet Data'[AltPortfolioName]<>"") ,
                                             'Samlet Data'[MV Ultimo inkl. repo og vedh. rente] )


However I have tried using CALCULATE and ALL as per below which is working when I dont have a top 10 filter on.

MV Ultimo Portfolio = CALCULATE( [MV Ultimo] ,
                                    ALLSELECTED( 'Samlet Data'[ISINName] ) )
Which gives me this:
Solle_1-1663928815793.png


Can someone help me out on this?

Best Regards,
Solle



1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @Solle ,

 

According to your description, you want to get total value for whole portfolio in matrix. Here are my steps you can follow as a solution.

 

(1)This is my test data.

vtangjiemsft_0-1664263941268.png

 

(2)We can create  a measure.

 

Measure = CALCULATE( SUM('Table'[Column1]) , ALL('Table'[ISINName]))

 

(3) Then the result is as follows.

vtangjiemsft_1-1664263941276.png

 

In addition, you can refer the following links to try to solve your problem.

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @Solle ,

 

According to your description, you want to get total value for whole portfolio in matrix. Here are my steps you can follow as a solution.

 

(1)This is my test data.

vtangjiemsft_0-1664263941268.png

 

(2)We can create  a measure.

 

Measure = CALCULATE( SUM('Table'[Column1]) , ALL('Table'[ISINName]))

 

(3) Then the result is as follows.

vtangjiemsft_1-1664263941276.png

 

In addition, you can refer the following links to try to solve your problem.

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

 

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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.

Top Solution Authors