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
Naveen29
Helper II
Helper II

DAX help needed

My current matrix table in the PowerBI showing like table A: Dont want to change M query ,table relationships etc. I just need simple DAX which converts the Region values to Negative , and sum should (Region1+Region2+region3)- Region as shown in table B.

 

this is just sample data , we have number of regions in the data

Table A:

 

Naveen29_0-1706807638892.png

to table B

Naveen29_1-1706807681675.png

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Naveen29 ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create two measures. 

Measure = IF(MAX('Table'[Region])="Region",-SUM('Table'[Value]),SUM('Table'[Value]))
Measure 2 = SUMX(VALUES('Table'[Region]),[Measure])

(3) Then the result is as follows.

vtangjiemsft_0-1706857228693.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Aditya062
Frequent Visitor

You can create Calculated column for that 

Negative Sales = IF('Summerized table'[Country] = "Mexico",  0 -'Summerized table'[ Sales],'Summerized table'[ Sales])
 
Aditya062_0-1706868438931.pngAditya062_1-1706868455883.png

 

View solution in original post

3 REPLIES 3
Aditya062
Frequent Visitor

You can create Calculated column for that 

Negative Sales = IF('Summerized table'[Country] = "Mexico",  0 -'Summerized table'[ Sales],'Summerized table'[ Sales])
 
Aditya062_0-1706868438931.pngAditya062_1-1706868455883.png

 

Anonymous
Not applicable

Hi @Naveen29 ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create two measures. 

Measure = IF(MAX('Table'[Region])="Region",-SUM('Table'[Value]),SUM('Table'[Value]))
Measure 2 = SUMX(VALUES('Table'[Region]),[Measure])

(3) Then the result is as follows.

vtangjiemsft_0-1706857228693.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Idrissshatila
Super User
Super User

Hello @Naveen29 ,

 

can you provide how is the data in the data view or attach your pbix file.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

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.