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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Juanpablocl96
Frequent Visitor

Category subtotal is mistakenly the same as grand total

I am currently having trouble with a matrix row subtotal, I think it is because I can only do a single relationship between two tables, have tried only using Programa academico as well as a column concatenating both Modalidad & Programa academico(Which the subtotal I'm having trouble is Modalidad) but it isn't working.PBISubtotals.jpg

 

1 ACCEPTED SOLUTION
Duia
Resolver II
Resolver II

Hi  @Juanpablocl96 ,

I created some data:

Duia_0-1660201077054.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
   NOT( HASONEFILTER('Table'[Modalidad])),
       SUMX(
        ALL('Table'),
       [Meta])
       ,
IF(
   HASONEVALUE('Table'[Program academico]),
MAX('Table'[Meta]),
    SUMX(
        FILTER(ALL('Table'),
        'Table'[Modalidad]=MAX('Table'[Modalidad])),[Meta])))

2. Result:

Duia_1-1660201077056.png

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
Duia
Resolver II
Resolver II

Hi  @Juanpablocl96 ,

I created some data:

Duia_0-1660201077054.png

Here are the steps you can follow:

1. Create measure.

Measure =
IF(
   NOT( HASONEFILTER('Table'[Modalidad])),
       SUMX(
        ALL('Table'),
       [Meta])
       ,
IF(
   HASONEVALUE('Table'[Program academico]),
MAX('Table'[Meta]),
    SUMX(
        FILTER(ALL('Table'),
        'Table'[Modalidad]=MAX('Table'[Modalidad])),[Meta])))

2. Result:

Duia_1-1660201077056.png

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.