Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |