Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Everyone,
I have a problem and i am unable to fix that.
In my report , i have code column that contains these extension codes /LH , /LE,/LS/ and /DE,/DS,/DH. In every month many codes were created, now the scenario is, i need to count only /L extension codes and if count =1 or 2or3or4, we need add runs like this
count of code * 5 runs and if count >= 10 or more we need to add 50 runs, 50 is final. These runs i need to add to a measure and this shold be happened in every month.
i have tried this formula, but not getting output ,
Hi @ramie ,
Its difficult to answer without seeing data but based on what you are trying below could be ideal code:-
rowscounting 2 =
VAR LCOUNT =
CALCULATE (
SUM ( 'CARL_CS02 CSWO_WO'[WO COUNT] ),
FILTER (
'CARL_CS02 CSWO_WO',
CONTAINSSTRING ( 'CARL_CS02 CSWO_WO'[WO FILTER], "/L" )
)
)
VAR ADDINGRUNS =
IF (
LCOUNT = 0,
'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 1,
5 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 2,
10 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 3,
15 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 4,
20 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 5,
25 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 6,
30 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 7,
35 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 8,
40 + 'DAX FORMULAS'[L1-SCORE],
IF (
LCOUNT = 9,
45 + 'DAX FORMULAS'[L1-SCORE],
IF ( LCOUNT >= 10, 50 + 'DAX FORMULAS'[L1-SCORE], 0 )
)
)
)
)
)
)
)
)
)
)
RETURN
ADDINGRUNS
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |