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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Matrix visualization: assigning (fixed) values in Total cell

Can we assign a value, which is not an aggregation of other values in the subsection of the matrix visualization. 

eg. in the below table, the yellow cells are not sum, average, or any other calculation from other values in the column, but a target value defined by business..

 

Capture.PNG

1 ACCEPTED SOLUTION
JarroVGIT
Resident Rockstar
Resident Rockstar

You could use a measure for the second column and use the ISINSCOPE() function to determine what value to use. For example, I created the following 2 tables in PBI (also: please never post pictures of tables because now we have to recreate it for you):

CountryPersonActual SalesTarget Sales
USAPerson1150150
USAPerson2160130
USAPerson3120140
CanadaPerson1200250
CanadaPerson2100200
CanadaPerson3150150
MexicoPerson1100120
MexicoPerson2100130
MexicoPerson3100140
    
CountryTarget Sales 
USA350  
Canada540  
Mexico360  

 

I then created the following measure, which looks at the current context and determines if it is evaluated in a Country context of Person context. If it is the first case, than it will lookup the corresponding sales target in the second table, otherwise it will sum the Sales[Target Sales] column:

 

TargetSalesMeasure = 
SWITCH( TRUE(), 
    ISINSCOPE(Sales[Person]), SUM(Sales[Target Sales]),
    LOOKUPVALUE(CountryTargets[Target Sales], CountryTargets[Country], SELECTEDVALUE(Sales[Country])))

 

This results in the following matrix:

image.png

Neat stuff huh? 🙂 Let me know if this answers your question!

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
JarroVGIT
Resident Rockstar
Resident Rockstar

You could use a measure for the second column and use the ISINSCOPE() function to determine what value to use. For example, I created the following 2 tables in PBI (also: please never post pictures of tables because now we have to recreate it for you):

CountryPersonActual SalesTarget Sales
USAPerson1150150
USAPerson2160130
USAPerson3120140
CanadaPerson1200250
CanadaPerson2100200
CanadaPerson3150150
MexicoPerson1100120
MexicoPerson2100130
MexicoPerson3100140
    
CountryTarget Sales 
USA350  
Canada540  
Mexico360  

 

I then created the following measure, which looks at the current context and determines if it is evaluated in a Country context of Person context. If it is the first case, than it will lookup the corresponding sales target in the second table, otherwise it will sum the Sales[Target Sales] column:

 

TargetSalesMeasure = 
SWITCH( TRUE(), 
    ISINSCOPE(Sales[Person]), SUM(Sales[Target Sales]),
    LOOKUPVALUE(CountryTargets[Target Sales], CountryTargets[Country], SELECTEDVALUE(Sales[Country])))

 

This results in the following matrix:

image.png

Neat stuff huh? 🙂 Let me know if this answers your question!

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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 Kudoed Authors