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

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

 Category1 Apple 10 Category1 grapes 20 Category1 oranges 30 Category1 banana 40 Category2 Apple 20 Category2 grapes 60 Category2 oranges 30 Category2 banana 40

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

 Product Category1 Product Value Value_Sum_AllProducts Product% Category1 Apple 10 40 25 Category1 oranges 30 40 75 Category2 Apple 20 50 40 Category2 oranges 30 50 60

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

1 ACCEPTED SOLUTION
Resident Rockstar

here is one way of achieving it

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

cheers,
S

Resident Rockstar

here is one way of achieving it

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

cheers,
S

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.