Forum Discussion
Grouping Measures into categories
- 1 month ago
For this scenario, Field Parameters alone won't give you a true hierarchy/grouping of measures, because the parameter table is designed to select fields/measures dynamically, not to create multi-level group structures.
A better approach is to use a disconnected table + SWITCH measure pattern (or a calculation group if you have Tabular Editor available).
Option 1: Disconnected table + SWITCH (common approach)
Create a table like:
Objective Measure Name Sort
Accelerate growth via acquisition Enquiry Count 1 Accelerate growth via acquisition Qualified Enquiry Count 2 Accelerate growth via acquisition SQL Count 3 Improve retention Customer Count 4 Improve retention Churn Rate 5 Then create a slicer using Objective and a matrix using Measure Name.
Create a dynamic measure:
Selected Metric Value = SWITCH( SELECTEDVALUE('Measure Selector'[Measure Name]), "Enquiry Count", [Enquiry Count], "Qualified Enquiry Count", [Qualified Enquiry Count], "SQL Count", [SQL Count], "Customer Count", [Customer Count], "Churn Rate", [Churn Rate] )Now your matrix can display:
Objective └── Measure Name Value Enquiry Count 120 Qualified Enquiry 80 SQL Count 45 Objective └── Measure Name Value Customer Count 500 Churn Rate 5%Option 2: Calculation Groups (recommended for enterprise models)
If you use Tabular Editor, calculation groups provide a cleaner solution because you can manage many measures without creating a very large SWITCH statement.
You can create:
Calculation items for your metrics.
Metadata columns for grouping/objectives.
Better governance and easier maintenance.
Option 3: Keep Field Parameters + add a supporting dimension
You can also keep your existing Field Parameter and create a separate mapping table:
Field Parameter Item | | Measure Metadata Table | | Objective GroupThen use the metadata table for grouping/filtering.
For around 30 measures, I would recommend the disconnected table + SWITCH approach because it is simple, transparent, and easy to maintain. If this grows into hundreds of KPIs across multiple reports, then calculation groups become the better long-term design.
For more information:
Field parameters in Power BI: https://learn.microsoft.com/power-bi/create-reports/power-bi-field-parameters
Calculation groups: https://learn.microsoft.com/analysis-services/tabular-models/calculation-groups
💡 Helpful? Give a Kudos 👍 — keep the community growing.
✅ Solved your issue? Mark this as the Accepted Solution ✔️
Best regards, Prince Singh | Data Science & Microsoft Fabric Enthusiast
For this scenario, Field Parameters alone won't give you a true hierarchy/grouping of measures, because the parameter table is designed to select fields/measures dynamically, not to create multi-level group structures.
A better approach is to use a disconnected table + SWITCH measure pattern (or a calculation group if you have Tabular Editor available).
Option 1: Disconnected table + SWITCH (common approach)
Create a table like:
Objective Measure Name Sort
| Accelerate growth via acquisition | Enquiry Count | 1 |
| Accelerate growth via acquisition | Qualified Enquiry Count | 2 |
| Accelerate growth via acquisition | SQL Count | 3 |
| Improve retention | Customer Count | 4 |
| Improve retention | Churn Rate | 5 |
Then create a slicer using Objective and a matrix using Measure Name.
Create a dynamic measure:
Selected Metric Value =
SWITCH(
SELECTEDVALUE('Measure Selector'[Measure Name]),
"Enquiry Count", [Enquiry Count],
"Qualified Enquiry Count", [Qualified Enquiry Count],
"SQL Count", [SQL Count],
"Customer Count", [Customer Count],
"Churn Rate", [Churn Rate]
)Now your matrix can display:
Objective
└── Measure Name Value
Enquiry Count 120
Qualified Enquiry 80
SQL Count 45
Objective
└── Measure Name Value
Customer Count 500
Churn Rate 5%Option 2: Calculation Groups (recommended for enterprise models)
If you use Tabular Editor, calculation groups provide a cleaner solution because you can manage many measures without creating a very large SWITCH statement.
You can create:
Calculation items for your metrics.
Metadata columns for grouping/objectives.
Better governance and easier maintenance.
Option 3: Keep Field Parameters + add a supporting dimension
You can also keep your existing Field Parameter and create a separate mapping table:
Field Parameter Item
|
|
Measure Metadata Table
|
|
Objective GroupThen use the metadata table for grouping/filtering.
For around 30 measures, I would recommend the disconnected table + SWITCH approach because it is simple, transparent, and easy to maintain. If this grows into hundreds of KPIs across multiple reports, then calculation groups become the better long-term design.
For more information:
Field parameters in Power BI: https://learn.microsoft.com/power-bi/create-reports/power-bi-field-parameters
Calculation groups: https://learn.microsoft.com/analysis-services/tabular-models/calculation-groups
💡 Helpful? Give a Kudos 👍 — keep the community growing.
✅ Solved your issue? Mark this as the Accepted Solution ✔️
Best regards, Prince Singh | Data Science & Microsoft Fabric Enthusiast
- masplin1 month ago
Impactful Individual
I tried the switch version and got one issue. Al the formatting has benelost so every result is a 2 digit decimal. In the underlying model they are formatted whole numbers or %. Is there a way to keep the source formatting or you have to add the format to the switch for each measure?
- Selva-Salimi1 month ago
Solution Sage
Hi masplin ,
you can add a column in your disconnected table which include 1 and 2, 1 for numbers and 2 for percent. then in your measure add
IF ( table[flag] = 1 , selected metric value, FORMAT (selected metric value , "0.0%"))
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution ✔️ to help the other members find it more quickly.