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,
I am new to Power BI.
I want to right the Dax measure to get the count of customers (ID) who succeeds after their 1 attempt. For example, for id 1 the first attempt was an error & if the second or third, etc. attempt was succeeded, then I should count as one.
| ID | AttemptError | ISAttemptValid |
| 1 | error | False |
| 2 | null | True |
| 1 | null | True |
| 3 | error | false |
| 3 | null | true |
Regards,
praveen
Hi @Anonymous ,
Create a index column from Power query then create a new column like below and use it as filter on your visual:-
Column =
VAR result =
COUNTROWS (
FILTER (
'Table',
'Table'[ID] = EARLIER ( 'Table'[ID] )
&& 'Table'[ISAttemptValid] = FALSE ()
&& 'Table'[Index] < EARLIER ( 'Table'[Index] )
)
)
RETURN
IF ( result > 0, 1, 0 )
Output:-
Thanks,
Samarth
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
You could create a measure as
Num valid attempts = CALCULATE( COUNTROWS( 'Table' ), 'Table'[Is Valid Attempt] = TRUE() )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |