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
Saleslink
New Member

Adding Multiple Total Columns to a Matrix

New to Power Bi. Can find similiar queries, but the basic set up of the raw data is different so i can't seem to make the responses work.

So i have my raw data that is imported which looks like this:

Site NameProduct NameRANGE
Site AProduct A1
Site AProduct B1
Site AProduct C1
Site AProduct D1
Site BProduct A1
Site BProduct B0
Site BProduct C1
Site BProduct D0
Site CProduct A1
Site CProduct B0
Site CProduct C0
Site CProduct D1
Site DProduct A1
Site DProduct B1
Site DProduct D0

 

Hoping for a solution which allows for the number of sites can change and the number of products.

I can get the data to display like this:

 Product AProduct BProduct CProduct D
Site A1111
Site B1010
Site C1001
Site D11 1
TOTAL4223

 

What i want to be able to do is to display the data like:

 Product AProduct BProduct CProduct D
Total True4223
Total False0211
Percent100%50%66%75%
Site A1111
Site B1010
Site C1001
Site D11 1

 

Note how there was no response for Site D Product C, so it is ignored in the totals.

Is this possible. 

Also can these total fieds be locked so if i had 200 sites and scrolled down, i would still see my 3 total rows.

 

Thanks for any help.

1 REPLY 1
Chris_White
Resolver II
Resolver II

The best first step for you is to create some measures.  Assuming your data table is called 'RawData':

 

Total True = SUM('RawData'[RANGE])

Total False = COUNTROWS('RawData')-[Total True]

Percent = DIVIDE([Total True],[Total True]+[Total False])

 

Once you've created these 3 measures, I think the best solution for you is to create two visuals.  One matrix showing product by site, as you have it already, and another just showing the totals and percentages, using the measures you've just created.  I cannot think of a way of doing what you want in one visual.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 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.

April2025 Carousel

Fabric Community Update - April 2025

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