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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Percent usage in matrix type table in Power BI.

I am in doubt as to how to perform percentages when I go to the next level of drill down in my matrix, the first line was ok, but when I go down the level, 100% is displayed in all data.

 

My base formula is: 

Total Sales Underline = CALCULATE([Sale Qty Weight KG], ALLSELECTED('Item'[Underline - Name]))
% Share Underlines = DIVIDE([Sales Qty Weight KG], [Total Sales Underlines])
 

but there are other levels that need the percentage. Can someone help me?

 

how I use the other lines, like:


Item [Group - Name]
Item - Description [Description]

 

Marcorelio_0-1677692441464.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

 

try like:

% Share Underlines = 
DIVIDE(
    [Sales Qty Weight KG], 
    CALCULATE(
        [Sale Qty Weight KG], 
        ALLSELECTED('Item'[Description])
)

 

Tried to simulate your case. Supposing your table looks like:

FreemanZ_0-1677724447584.png

then try to plot the matrix with a measure like:

%Share = 
DIVIDE(
    SUM(TableName[Qty]), 
    CALCULATE(
        SUM(TableName[Qty]), 
        ALLSELECTED(TableName[Description])
    )
)

it worked like:

FreemanZ_1-1677724531300.png

 

 

 

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @Anonymous 

 

try like:

% Share Underlines = 
DIVIDE(
    [Sales Qty Weight KG], 
    CALCULATE(
        [Sale Qty Weight KG], 
        ALLSELECTED('Item'[Description])
)

 

Tried to simulate your case. Supposing your table looks like:

FreemanZ_0-1677724447584.png

then try to plot the matrix with a measure like:

%Share = 
DIVIDE(
    SUM(TableName[Qty]), 
    CALCULATE(
        SUM(TableName[Qty]), 
        ALLSELECTED(TableName[Description])
    )
)

it worked like:

FreemanZ_1-1677724531300.png

 

 

 

Anonymous
Not applicable

Good morning,

 

It worked, thank you very much!

 

In this case, I used the formula as:

% Participation Underlines = DIVIDE(
    [Sale Qty Weight KG],
     CALCULATE([Sale Qty Weight KG],
     ALLSELECTED('Item - Description'[Item - Description]), ALLSELECTED('Item'[Group - Name]), ALLSELECTED('Item'[Underline - Name])
))

 

Marcorelio_0-1677752961824.png

 

andhiii079845
Solution Sage
Solution Sage

What happended when you add Item [Group - Name]
Item - Description [Description]  in the this statement? Like;

ALLSELECTED('Item'[Underline - Name],Item [Group - Name])

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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