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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
bargie
Regular Visitor

Matrix with category and sub category and another table

Hi,

 

New to PBI and hopefully this isnt a ridiculous question.

 

I have a working report that includes sales quantities/values etc in a matrix and it pulls a budgeted valued from a separate table.

 

I'm wanting to expand the matrix table to include a sub category. This works for the data directly in the sales table but the budgeted value is a showing as a total for all rows.

 

We have fact table of sales bridged to the budget table at the category level.

 

I've included an image below from a simplified verion of the report and I'm hoping to have the "Pen/Rollerball" budgeted quantity showing in the matrix as 84000 for example, next to the sales quantity.

bargie_2-1718984632702.png

bargie_1-1718984594945.png

 

I cant see where to attach a pbix, maybe as being a new user?

 

Thanks in advance!

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@bargie If the table is unrelated or it is related on something like Category, you could do something like this:

Budget Qty Measure = 
  VAR __Category = MAX('Table'[Category])
  VAR __SubCategory = MAX('Table'[Sub Category])
  VAR __Result = MAXX( FILTER( 'Other Table', [Category] = __Category && [Sub Category] = __SubCategory ), [Budget Qty] )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@Greg_Deckler Thanks very much, that worked great!

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@bargie If the table is unrelated or it is related on something like Category, you could do something like this:

Budget Qty Measure = 
  VAR __Category = MAX('Table'[Category])
  VAR __SubCategory = MAX('Table'[Sub Category])
  VAR __Result = MAXX( FILTER( 'Other Table', [Category] = __Category && [Sub Category] = __SubCategory ), [Budget Qty] )
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thanks very much, that worked great!

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.