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
MichaelZang
Helper I
Helper I

Display Subtotal Column Based on Another Column's Values in Power BI

Hi everyone,

 

Sorry for re-posting but I'm pretty desperate about this issue 😓

 

I hope you can help me with this issue. I appreciate it!!! 

 

Context: You can see from the attached image below that I have:

Cluster Chart

  • x-axis: USG
  • y-axis:  company_name

Matrix

  • Row: company_name
  • Column: Metric
  • Value: Metric Value

MichaelZang_1-1742387919590.png

 

Problem: I'm not sure how to display the Subtotal column in the matrix so that it reflects values based on the USG column.

What I need: I need 'Column Subtotals' to correctly display values from the USG column so I can sort them in descending order to align with the cluster chart on the right.

 

Attempt: I have rewritten the DAX formula multiple times, but I haven’t been able to fix the issue 

 

PBIX FILE: HERE

1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Hi @MichaelZang 

I am probably misunderstanding but why not reference your existing measure in the total?

    IF(
       not( ISINSCOPE(financial_percentage[Metric]))
       ,      [USG_Global]
        ,           CALCULATE (
            SELECTEDVALUE ( financial_percentage[Metric Value] ),
            FILTER ( ALL ( dim_region ), dim_region[region_name] = "Global" )
        )

    )
 
SamWiseOwl_0-1742393883658.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

3 REPLIES 3
sroy_16
Resolver II
Resolver II

Hello @MichaelZang 

Try using thius measuire and see if it fulfils your requirement or not.

Metric Value with USG Subtotal =
SUMX(
VALUES(YourTable[company_name]),
CALCULATE(SUM(YourTable[Metric Value]), YourTable[USG])
)

I hope my solution helps! If it works for you and resolves the issue you're facing, please consider marking it as the solution. This will make it easier for others who encounter the same problem to find the answer and save them some time.

If you're happy with the solution, feel free to provide some Kudos




SamWiseOwl
Super User
Super User

Hi @MichaelZang 

I am probably misunderstanding but why not reference your existing measure in the total?

    IF(
       not( ISINSCOPE(financial_percentage[Metric]))
       ,      [USG_Global]
        ,           CALCULATE (
            SELECTEDVALUE ( financial_percentage[Metric Value] ),
            FILTER ( ALL ( dim_region ), dim_region[region_name] = "Global" )
        )

    )
 
SamWiseOwl_0-1742393883658.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hi @SamWiseOwl 

Thank you for your prompt answer 😊 It works perfectly 😊 I've struggled with it for the last few days

I really appreciate your help 😁 

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