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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bvdm1980
Helper I
Helper I

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors