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
hulabalu
Regular Visitor

Dynamic Calculated Header in Matrix

I have a set of data from 3 tables that I want to group into sections in a Matrix.

 

the source data looks like:

 

Salesman Table

SalesmanAreaStatus
Salesman 1CentralActive
Salesman 2CentralActive
Salesman 3NorthActive
Salesman 4EastActive
Salesman 5WestActive
Salesman 6WestInactive

 

Visit Table

DateWeekSalesmanCustomerPlannedVisited
4 Jan 211Salesman 1Customer 1110
4 Jan 211Salesman 1Customer 1211
4 Jan 211Salesman 1Customer 1311

4 Jan 21

1Salesman 3Customer 3111

5 Jan 21

1Salesman 1Customer 1111

6 Jan 21

1Salesman 4Customer 4111

12 Jan 21

2Salesman 1Customer 1211

12 Jan 21

2Salesman 2Customer 2110

13 Jan 21

2Salesman 5Customer 5111

20 Jan 21

3Salesman 2Customer 2211

27 Jan 21

4Salesman 1Customer 1411

28 Jan 21

4Salesman 5Customer 5211

 

Sales Result Table

DateWeekSalesmanCustomerQuantityModelRevenue
4 Jan 211Salesman 1Customer 121Model 310000
4 Jan 211Salesman 1Customer 121Model S30000
4 Jan 211Salesman 1Customer 131Model 312000

4 Jan 21

1Salesman 3Customer 311Model S28000

5 Jan 21

1Salesman 1Customer 111Model 311000

6 Jan 21

1Salesman 4Customer 411Model X22000

12 Jan 21

2Salesman 1Customer 121Model 310000

13 Jan 21

2Salesman 5Customer 511Model S32000

20 Jan 21

3Salesman 2Customer 221Model 39000

27 Jan 21

4Salesman 1Customer 141Model S30000

28 Jan 21

4Salesman 5Customer 521Model 313000

 

I want to build a Matrix table based on those data, the column headers would be the sum of number of visits a salesman made, the row header would be the sum of quantity of unit he sold, and the value would be the number of salesman.

 

Quantity \ Visit0125Total
01   1
1 3  3
2  1 1
6   11
Total13116

 

The tricky part that I have a problem with is I want to be able to add a slicer to be able to select the week for the report. I tried using calculated column for sum of visits and sum of quantity but the calculation apparently is not affected by the slicer. I have also tried using measure instead for sum of visits and sum of quantity but could not use it as a header for the matrix column and row.

 

Is there any way to build a measure or column based on the name of the Measure?

 

Thanks

 

Tommy

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hulabalu , to me this seem like binning or dynamic segmentation on a measure using the independent table.

 

See if these can help

 

https://youtu.be/CuczXPj0N-k

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: 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
amitchandak
Super User
Super User

@hulabalu , to me this seem like binning or dynamic segmentation on a measure using the independent table.

 

See if these can help

 

https://youtu.be/CuczXPj0N-k

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for the response. I used the segmentation using independent table like the one on the video and it worked as  expected. kudos

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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