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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
wiranqa
New Member

How to add matrix column totals based on year?

I have a matrix with Parent, Customer, and PL5 Segment as the rows, NPS as the values, and DateFormat as the columns. i have 2024 and 2025 data and there is a slicer for the user to select what months they want to look at. I am trying to add total columns based on year, one for 2024 and one for 2025. is there a way to add in a total column that sums the filtered months columns based on the months selected?

1 ACCEPTED SOLUTION
v-nmadadi-msft
Community Support
Community Support

Hi @wiranqa ,
Thanks for reaching out to the Microsoft fabric community forum.

Please check if this is your desired output

vnmadadimsft_0-1745245410577.png

 


I was able to create it using the DAX  measure mentioned by @pankajnamekar25  , uploading the .pbix file for reference, please let us know how you would like us to modify the output if this is not your desired result.

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

View solution in original post

9 REPLIES 9
v-nmadadi-msft
Community Support
Community Support

Hi @wiranqa ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Thanks 

v-nmadadi-msft
Community Support
Community Support

Hi @wiranqa ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

v-nmadadi-msft
Community Support
Community Support

Hi @wiranqa ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

v-nmadadi-msft
Community Support
Community Support

Hi @wiranqa ,
Thanks for reaching out to the Microsoft fabric community forum.

Please check if this is your desired output

vnmadadimsft_0-1745245410577.png

 


I was able to create it using the DAX  measure mentioned by @pankajnamekar25  , uploading the .pbix file for reference, please let us know how you would like us to modify the output if this is not your desired result.

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

mdaatifraza5556
Super User
Super User

Hi @wiranqa 

Can you please clarify that the result you want is what I have done?

If yes, then follow the steps below.

1. Created three measures
     

NPS = SUM('NPSData'[NPS])
 
----------------------------------------------------------------------------
 
Total NPS 2024 =
CALCULATE(
    [NPS],
    'DateTable'[Year] = 2024,
    KEEPFILTERS(VALUES('DateTable'[DateFormat]))
)
 
------------------------------------------------------------------------------
 
Total NPS 2025 =
CALCULATE(
    [NPS],
    'DateTable'[Year] = 2025,
    KEEPFILTERS(VALUES('DateTable'[DateFormat]))
)



Screenshot 2025-04-21 100213.png

 




If this answers your questions, kindly accept it as a solution and give kudos.

I dont want a total for each month. I only need one total for each year at the end like a column grand total

 

Hi @wiranqa 

Can you check this? Do you want this as your result?
If yes then remove DateFormat from the Columns area.

Screenshot 2025-04-21 101857.png

 

 

If this answers your questions, kindly accept it as solution and give kudos

pankajnamekar25
Super User
Super User

 

@wiranqa 

 

you can create 2 measure for each year and it will respect month selection

 

Total 2024 =

CALCULATE(

    SUM('YourTable'[NPS]),

    YEAR('YourTable'[DateFormat]) = 2024

)

 

 

Total 2025 =

CALCULATE(

    SUM('YourTable'[NPS]),

    YEAR('YourTable'[DateFormat]) = 2025

)

 

 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

If I do this, I get each measure for every month. I need to see the total for each year once at the end based on the selected months

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors