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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Matricola
Frequent Visitor

Help needed

Hello all 

I am trying to recreate the following excel chart creating a total but by excluding Brand 5 

Anyone has an idea how to ?

Picture2.jpg

 
Excl. Brand 5Brand 1Brand 2Brand 3Brand 4Brand 5 Excl. Brand 5Brand 1Brand 2Brand 3Brand 4Brand 5
1000100200300400500 24%20%25%23%25%33%
1100200200300400100 26%40%25%23%25%7%
1150100200450400600 27%20%25%35%25%39%
950100200250400333 23%20%25%19%25%22%

 

 

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@Matricola 

 

Here is one way of doing this.

1) Create a table listing the x-axis categories. I've called it "Categories Table"Cat Table.JPG

The model looks like this. Notice how this Categories Table is unrelated in the model.

Model.JPG

 

2) Create the measures for the category "Excl, Brand 5"

            Sum of values ecluding Brand 5 

SUM excl B5 = CALCULATE([Sum of Values], FILTER('Dim Brand', 'Dim Brand'[Brand] <> "Brand 5"))​

           % of Excl B5 by Series 

 

% Excl. Brand 5 = 
VAR ExcSumTotal = CALCULATE([SUM excl B5], ALL('Dim Series'[Series]))
Return
DIVIDE([SUM excl B5], ExcSumTotal)

 

 

3) Create the measures for the Brand Values:

 

% per brand = 
Var BrandTotal = CALCULATE([Sum of Values], ALL('Dim Series'[Series]))
Return
DIVIDE([Sum of Values], BrandTotal)

 

 

4) Create the measure to filter by brands the category table

 

% per Brand for chart = CALCULATE([% per brand], TREATAS(VALUES('Categories Table'[Brand]), 'Dim Brand'[Brand]))

 

5) And finally the measure to include in the stacked chart visual:

 

Measure for visual = 
IF(SELECTEDVALUE('Categories Table'[Brand]) = "Excl. Brand 5", 
    [% Excl. Brand 5],  
        [% per Brand for chart])

 

 

Now create the visual using the "Category Table" as the x-axis and add this final [Measure for visual]

and you get this:

Result.JPG

 

I've included the sample PBIX file for your reference

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

@Matricola 

 

Here is one way of doing this.

1) Create a table listing the x-axis categories. I've called it "Categories Table"Cat Table.JPG

The model looks like this. Notice how this Categories Table is unrelated in the model.

Model.JPG

 

2) Create the measures for the category "Excl, Brand 5"

            Sum of values ecluding Brand 5 

SUM excl B5 = CALCULATE([Sum of Values], FILTER('Dim Brand', 'Dim Brand'[Brand] <> "Brand 5"))​

           % of Excl B5 by Series 

 

% Excl. Brand 5 = 
VAR ExcSumTotal = CALCULATE([SUM excl B5], ALL('Dim Series'[Series]))
Return
DIVIDE([SUM excl B5], ExcSumTotal)

 

 

3) Create the measures for the Brand Values:

 

% per brand = 
Var BrandTotal = CALCULATE([Sum of Values], ALL('Dim Series'[Series]))
Return
DIVIDE([Sum of Values], BrandTotal)

 

 

4) Create the measure to filter by brands the category table

 

% per Brand for chart = CALCULATE([% per brand], TREATAS(VALUES('Categories Table'[Brand]), 'Dim Brand'[Brand]))

 

5) And finally the measure to include in the stacked chart visual:

 

Measure for visual = 
IF(SELECTEDVALUE('Categories Table'[Brand]) = "Excl. Brand 5", 
    [% Excl. Brand 5],  
        [% per Brand for chart])

 

 

Now create the visual using the "Category Table" as the x-axis and add this final [Measure for visual]

and you get this:

Result.JPG

 

I've included the sample PBIX file for your reference

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hello there

Yes this is doing the trick

Thanks

amitchandak
Super User
Super User

@Matricola , Unpivot the data.https://radacad.com/pivot-and-unpivot-with-power-bi

You can create 100% stacked visual . Remove Brand 5 using sclicer of visual level filter

 

or have measure like

divide(Sum(Table[Value]), calculate(Sum(Table[Value]), all(Table))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors