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
bvdm1980
Helper II
Helper II

add % of total column to filtered matrix

Hi 

 

I have a matrix table, with columns: 

 

Supplier Name

Order Amount

 

I filtered this table to get the top 10 of suppliers. 

But how do i add a column in that matrix showing the % of the total order amount for all suppliers? 

 

I tried this: 

DIVIDE(
  SUM(fact_orderlines[order amount]),
    CALCULATE(
      SUM(Fact_orderlines[order amount]),
      ALLSELECTED(Fact_orderlines[order amount])))
 
but that aint working. I searched on internet but didnt find solution yet or maybe i found it but am using the dax wrong? 

thanks for the help!
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi  @bvdm1980

try like:

DIVIDE(
  SUM(fact_orderlines[order amount]),
  CALCULATE(
      SUM(Fact_orderlines[order amount]),
      ALLSELECTED(Fact_orderlines[Supplier Name])
    )
)

 

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi  @bvdm1980

try like:

DIVIDE(
  SUM(fact_orderlines[order amount]),
  CALCULATE(
      SUM(Fact_orderlines[order amount]),
      ALLSELECTED(Fact_orderlines[Supplier Name])
    )
)

 

Thanks for the help (sorry for the late reply :)). Only seeing it just now. 

I found another solution that works like a charm as well: 

DIVIDE(
    SUMX(
        TOPN(10,Fact_orderlinesSUM(Fact_orderlines[Amount])),
        Fact_orderlines[Amount]),
        SUMX(ALLSELECTED(Fact_orderlines), Fact_orderlines[Amount]))

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.