Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello guys.
I need to create a rule that tells me if there are 3 or more PN's for the same Case Number.
If it is 3 or more, you need to reform the message: "Call the TSE"
If below 3: "Follow with Service"
Thanks.
Ejemplo:
Solved! Go to Solution.
Hi @Anonymous ,
You seem to have created a calculated column, if you want a calculated column, try like:
Result =
VAR _COUNT =
CALCULATE (
DISTINCTCOUNT ( 'Parts Order Line'[PN] ),
FILTER (
ALL ( 'Parts Order Line' ),
'Parts Order Line'[CaseNumber] = EARLIER ( 'Parts Order Line'[CaseNumber] )
)
)
VAR _RESULT =
IF ( _COUNT >= 3, "Call the TSE", "Follow with Service" )
RETURN
_RESULT
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous try this measure:
Hi @Anonymous ,
I send you my pbi file with a simplified model. Do you have other columns in your table?
https://1drv.ms/u/s!Aj45jbu0mDVJiz-8PUm2VToAVzL2?e=DekHub
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
try this measure
Measure =
VAR _CurrentCase = SELECTEDVALUE('Facts51'[Case Number])
VAR A =
COUNTROWS(
FILTER(ALL('Facts51'),
'Facts51'[Case Number] = _CurrentCase
)
)
RETURN
SWITCH(TRUE(),
A>=3,"Call the TSE",
"Follow with Service"
)If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It didn't work, only an answer appeared.
Hi @Anonymous ,
You seem to have created a calculated column, if you want a calculated column, try like:
Result =
VAR _COUNT =
CALCULATE (
DISTINCTCOUNT ( 'Parts Order Line'[PN] ),
FILTER (
ALL ( 'Parts Order Line' ),
'Parts Order Line'[CaseNumber] = EARLIER ( 'Parts Order Line'[CaseNumber] )
)
)
VAR _RESULT =
IF ( _COUNT >= 3, "Call the TSE", "Follow with Service" )
RETURN
_RESULT
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 26 | |
| 24 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 21 | |
| 19 | |
| 17 |