cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Find total using DAX in Matrix table

Hi All

I have a matrix table with 3 hierarchies (e.g. >\$800 --> Apple --> 1.A), all my hierarchies and values are from the same Fact table. I'm trying to get the value (109,929) to calculate my Share % using DAX.

For example, the Share % for

• 1.A = 87,996 / 109,929
• Apple = 105,015 / 109,929

Does anyone know how I can get the total highlighted in Yellow?

Thanks,

BK

1 ACCEPTED SOLUTION
Community Support

Hi, @Anonymous

According to your description and sample picture, I think you want to use a measure to get the value in the Matrix you highlighted. Right? You can try this measure:

This is my test data based on your sample picture:

``````Measure =

CALCULATE(SUM('Table'[Computer Units]),FILTER('Table',[Level 1]=">\$800"))``````

And you can get what the value, like this:

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

Best Regards,

Community Support Team _Robert Qin

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

7 REPLIES 7
Community Support

Hi, @Anonymous

According to your description and sample picture, I think you want to use a measure to get the value in the Matrix you highlighted. Right? You can try this measure:

This is my test data based on your sample picture:

``````Measure =

CALCULATE(SUM('Table'[Computer Units]),FILTER('Table',[Level 1]=">\$800"))``````

And you can get what the value, like this:

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

Best Regards,

Community Support Team _Robert Qin

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

Super User

@Anonymous which measure you tried, I sent you the revised/updated measure.

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Super User

@Anonymous Just updated the measure, need to add level 3 column in the allselected as well

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Super User

@Anonymous here are the measures, first to simply sum the value and 2nd to calculate the %

``````Sales = SUM ( Table[Sales] )

% = DIVIDE ( [Sales], CALCULATE ( [Sales], ALLSELECTED ( Table[Lvl 2 Column], Table[Lvl 3 Column] ) )``````

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi Parry, thanks for the reply. I'm managed to get the level 2 total with your help but that's not what I'm looking for. I would like to display level 1 total, not sure where went wrong..

Thanks, BK

Super User

Hi,

Regards,
Ashish Mathur
http://www.ashishmathur.com
Anonymous
Not applicable

Hi Ashish, thanks for the reply. Unfortunately I do not have a PBI with dummy date to share with you..

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors
Top Kudoed Authors