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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SMITHY10283
Regular Visitor

Creating a new measure to display in matrix

New to powerbi and needed some help. 

Have a matrix visualisation where I have

regions in the column, and for the rows I have month/year. The values in the matrix shown are the counts of products for those regions sold in that month year. 

 AUSGERSWINZL
Jun 234521342
May 23 29482939
Apr 23 23505040
Mar 23 2030392
Feb 23 4030523

I have a new requirement to also add in a column called scope, which is a sum of the counts of products across all regions except Aus with the condition of 'In Scope' as "Yes" (In scope is a column in my data model which can either be Yes or NO) across the different month/years. 

 

I want this scope to be shown as a new column in the existing matrix for each month / year. 

 

 AUSGERSWINZL

Scope 

Jun 234521342144
May 23 29482939140
Apr 23 23505040130
Mar 23 2030392130
Feb 23 4030523120

 

The reason why I want to do this is so I can create a line bar chart. The bars would show the original matrix and the line would show the scope. 

Is this the right approach and if so how would I be able to do it? 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @SMITHY10283 

 

Based on the data you have provided, please check if this is the result you expect.

Count = SUM('Table'[Value])//Try to restore your data.
Measure = 
Var _table=SUMMARIZE('Table','Table'[Date],'Table'[Region],"Count",[Count])
Var _Sum=SUMX(FILTER(_table,[Region]<>"AUS"),[Count])
Return
IF(HASONEVALUE('Table'[Region]),[Count],_Sum)

vzhangti_0-1689648176134.png

vzhangti_2-1689648195054.png

vzhangti_3-1689648380462.png

Please check the annex and provide more data if there are discrepancies.

 

Best Regards,

Community Support Team _Charlotte

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

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

For Mar 2023 (and may be for other months as well), how can the numbers in the Scope column > sum of numbers across all regions?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-zhangti
Community Support
Community Support

Hi, @SMITHY10283 

 

Based on the data you have provided, please check if this is the result you expect.

Count = SUM('Table'[Value])//Try to restore your data.
Measure = 
Var _table=SUMMARIZE('Table','Table'[Date],'Table'[Region],"Count",[Count])
Var _Sum=SUMX(FILTER(_table,[Region]<>"AUS"),[Count])
Return
IF(HASONEVALUE('Table'[Region]),[Count],_Sum)

vzhangti_0-1689648176134.png

vzhangti_2-1689648195054.png

vzhangti_3-1689648380462.png

Please check the annex and provide more data if there are discrepancies.

 

Best Regards,

Community Support Team _Charlotte

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

TomMartens
Super User
Super User

Hey @SMITHY10283 ,

 

I have to admit that I have no idea what you are asking. Please, consider creating a pbix that contains sample data but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the file, to onddrive, google drive, or dropbox and share the link in this thread. Make sure that the file can be downloaded without without logging in. If you are using a spreadsheet to create the sample data instead of the manual input method, share the spreadsheet as well.

 

The most important thing, though, describe the expected output based on the sample data, e.g. how the measure relate to a line and stacked column chart / line and clustered column chart. I assume you are referencing one of former data visualization types with " ... line bar chart ... .".

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi @TomMartens 

Does that make more sense?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors