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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
bhaskarasalla
Frequent Visitor

Want to show percentage for specific product

Hi All,

I need one help for solving a below issue-

I have tried by using calculate & calculate all function but still now able to solve-

Here is problem

This is my data

 Category      Product  Value

Category1Apple10
Category1grapes20
Category1oranges30
Category1banana40
Category2Apple20
Category2grapes60
Category2oranges30
Category2banana40

  I want to create a chart ( table) to show category, product and value, and percenate (for that particular product )

Product Category1ProductValueValue_Sum_AllProductsProduct%
Category1Apple104025
Category1oranges304075
Category2Apple205040
Category2oranges305060

 

Here i considered only two product Apple & Oranges and excluded other product from visual level filter.

i created this measure 

Value_Sum_AllProducts = CALCULATE(SUM(Sheet1[Value]),ALL(Sheet1[Product])) 
but its consider all products but in my case i want to show Apple and Oranges sum for each category
 
Appreciate your efforts 🙂
1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi @bhaskarasalla,

here is one way of achieving it

AllProductsPrCategory =
CALCULATE (
    SUM ( 'Table'[Value] );
    FILTER ( ALL ( 'Table'[Product] ); 'Table'[Product] IN { "Apple"; "oranges" } )
)

cheers,
S

View solution in original post

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi @bhaskarasalla,

here is one way of achieving it

AllProductsPrCategory =
CALCULATE (
    SUM ( 'Table'[Value] );
    FILTER ( ALL ( 'Table'[Product] ); 'Table'[Product] IN { "Apple"; "oranges" } )
)

cheers,
S

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors