Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
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! Need help on the following scenario. So we are already set with our measure and working as expected Here it is:
Solution=
VAR countSolution=
CALCULATE ( COUNTA ( 'RiskColumn'[Solution] ) )
VAR countLagging =
CALCULATE (
COUNTA ( 'RiskColumn'[Solution] ),
FILTER (
'RiskColumn',
'RiskColumn'[Category] = "Lagging"
)
)
VAR countNotDelay =
CALCULATE (
COUNTA ( 'RiskColumn'[Solution] ),
FILTER (
'RiskColumn',
' RiskColumn'[Category] = "Not Delay"
)
)
RETURN
SWITCH (
TRUE (),
countDelay = countSolution
&& countLagging <= 0
|| countLagging <= 0
&& countNotDelay > 0, "Excellent",
( countLagging = 1
|| countLagging = 2 ), "Satisfactory",
( countLagging >= 3 ), "For Improvement"
)
Unfortunately, we need to have this converted to M code, so we just want to instead a column in the backend where it will contain the Level Column containing "Excellent", "Satisfactory", and "For Improvement"
I have this sample table similar to what we have in the backend but we are stuck at how the m code should look like so that each Solution is only mapped to only one level (excellent, satisfactory, etc). Or may be there are other ways to do this?
| Solution | Risk Category | Count | Quality Category |
| X | Delay | 2 | Lagging |
| X | Not delay | 3 | On time |
| Y | Delay | 1 | Lagging |
| Y | Not delay | 1 | On time |
| Z | Delay | 0 | On time |
| Z | Not delay | 3 | On time
|
so that each Solution is only mapped to only one level
You need to describe the aggregation rules for your scenario where you have multiple rows per Solution,
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 |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |