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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Anonymous
Not applicable

Matrix total : total of a column in sum and the total of the other column in average

Hi everyone,

 

I am looking to make a matrix that can show the weight shipped per month and the share of maritime on the total for each month/year. So far so good :

Ilias69_1-1645532725130.png

 

The problem is that on my totals, I do find the total weight shipped (sum) but on the total SEA% I would like to have an average for the year, but this is not the case.

 

Ilias69_2-1645532790887.png

For the weight I used this formula Total weight formula = SUMX(File1,File1[Total Weight])

For the Sea%, I used 2 measures : 

  • Sea weight = CALCULATE(SUM(File1[Total Weight]), File1[Shipping type]=40)
  • Sea% = DIVIDE([Sea weight],[Total weight formula],BLANK())

 

Do you have an idea for the average of the % of maritime to appear next to the sum of the weight?

 

Thank you.

 

Ilias

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can use isinscope or hasonevalue to change the grand total

 

https://xxlbi.com/blog/new-dax-function-isinscope/

 

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

You can take a look at the following link to use if statement with the filters to check current row context level and replace the calculation expressions:

Clever Hierarchy Handling in DAX - SQLBI

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous , You can use isinscope or hasonevalue to change the grand total

 

https://xxlbi.com/blog/new-dax-function-isinscope/

 

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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