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

% of Total with nested row members

Hi,

 

I have a matrix that I need to show both the $ amount and the % of total New Products for each row member.  The row members consist of ProductGroups on the left and next to it are subproducts (ex.  Climbing Equipment with subproducts of Ropes, Harnesses, etc next to it, which add up to the sum of Climbing Equipment.). 

The matrix is filtered on 'Climbing Equipment' but the % of total New Products needs to be a total of all new product groups, not just new Climbing Equipment.

 

Example:

Total of all new product groups = $1,000

New Climbing equipment product group = $200

New Ropes = $150

New Harnesses = $50

(Ropes + Harnesses = Climbing Equipment)

 

I would then want to show that Camping Equipment = 20%, Ropes = 15%, and harnesses = 5%, (Ropes + Harnesses add up to the Climbing Equipment's 20%). 

I tried:

% of total = Divide(sum('Products'[sales]), calculate( sum('Products'[sales]),all('Products'[ProductGroup]) ) )

...this gives me the 20% for climbing equipment but then gives me 100% for Ropes and 100% for Harnesses, rather than the 15% and 5%.

 

I also tried:

% of total = Divide(sum('Products'[sales]), calculate( sum('Products'[sales]),all('Products'[Products]) ) )

 

...this just gives me the 100% for climbing equipment but then gives me 75% for Ropes and 25% for Harnesses (this equals the % of filtered Product Group (aka:  Climbing equipment) rather than the % of total new products).

 

I also tried:

% of total = Divide(sum('Products'[sales]), calculate( sum('Products'[sales]),all('Products') ) )

...this just gives me the % for climbing equipment of ALL products in the database, including used (which as noted in the first sentence, I need % of total new products)

 

Any and all suggestions are greatly appreciated!

 

Thanks

2 REPLIES 2
Anonymous
Not applicable

I actually just figured it out - I used the Allexcept to filter out the used.

 

Thanks for any who started to look at this though.

Anonymous
Not applicable

Good work @Anonymous.

Don't forget to mark this post as solved.

 

Have a good coding!

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.