This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello all,
We need to build a matrix/table in Power BI where each row/column represents a different specification/metric, and each requires a completely different calculation logic.
For example:
Additionally, in some cases, the calculation may also vary based on the column header context.
Hi @manvishah17 ,
I would take a moment to thank @Hans-Georg_Puls for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
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.
Thank you.
Hi @manvishah17 ,
another option could be a matrix with calculation groups as columns and rows. For every cell the combination of two calculation items is set:
Your calculation group definitions should look similar to this in model view:
Check in table view if ordinal numbers are assigned to the calculation items. If not change them by drag and drop:
Assuming that rows have precendence a typical row calculation group item would look like this:
Row 1 = "Row 1"
A typical column item definition would look like this:
Col 1 = 0
If you want to change the priority for column 2 and row 2, you need something like:
Col 2 = "Col 2"
and
The matrix of my little demo:
Hope that helps.
Hi ,
Try to Put your spec names in a disconnected table → use it as Matrix rows → one master measure checks which spec is selected and runs the right calculation.
1. Disconnected Spec Table:
Spec Table =
DATATABLE( "SpecID", INTEGER, "SpecName", STRING, { { 1, "Spec A" }, { 2, "Spec B" }, { 3, "Spec C" } } )
No relationship needed. Use SpecName on Matrix Rows.
2.Split into Bucket Measures (NOT one giant SWITCH)
_Bucket1 =
SWITCH(
SELECTEDVALUE( 'Spec Table'[SpecID] ),
1, [Weighted Avg Logic],
2, [SLA Logic], BLANK() )
_Bucket2 =
SWITCH(
SELECTEDVALUE( 'Spec Table'[SpecID] ),
3, [Cost/Revenue Logic],
4, [Custom Score Logic], BLANK() )
3.Master Measure (routes to the right bucket)
Master KPI =
VAR _id = SELECTEDVALUE( 'Spec Table'[SpecID] )
RETURN
SWITCH(
TRUE(),
_id <= 15, [_Bucket1],
_id <= 30, [_Bucket2],
_id <= 50, [_Bucket3] )
Only one bucket fires per row — this is what prevents performance issues.
Always follow the below steps:
Thanks and Regards,
GainInsights Solutions
Trusted Microsoft Partner - https://gain-insights.com/partnerships/microsoft/
www.gain-insights.com
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 40 | |
| 39 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 76 | |
| 61 | |
| 34 | |
| 30 | |
| 25 |