Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mina97
Helper III
Helper III

count the number of applications

i have the following data

orderstauts
216submited
216accepted
217submited
217resumited
217accepted

 

i need to count the number of orders that got accepted without being reaplied so in this case it should give one order 
i wrote the following dax but it is NOT helping

AcceptedOrdersWithoutResubmit = 
CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        'Table',
        'Table'[stauts] = "accepted" &&
        NOT (
            CALCULATE(
                COUNTROWS('Table'),
                FILTER(
                    'Table',
                    'Table'[order] = EARLIER('Table'[order]) &&
                    'Table'[stauts] = "resumited"
                )
            ) > 0
        )
    )
)

please help and thank you 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @mina97 ,

The following DAX might work for you:

 

UniqueOrdersCount = COUNTROWS(VALUES('Table(2)'[order]))

 

The final output is shown in the following figure:

vjunyantmsft_0-1698124543180.png

Best Regards,

Dino Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @mina97 ,

The following DAX might work for you:

AcceptedOrdersWithoutResubmit =
COUNTROWS(
    FILTER(
        'Table',
        'Table'[status] = "accepted" &&
        NOT(
            CALCULATE(
                COUNTROWS('Table'),
                FILTER('Table', 'Table'[status] = "resumited"),
                ALLEXCEPT('Table', 'Table'[order])
            ) > 0
        )
    )
)

The final output is shown in the following figure:

vjunyantmsft_0-1698113089869.png

Best Regards,

Dino Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hey can you make it count the unique numbers order 

because i have other status and i do not want it to count them fore xample 

216Sumbit
216Review
216Paid
216Approved

the dax counted this as 4 😞 please help 

Anonymous
Not applicable

Hi, @mina97 ,

The following DAX might work for you:

 

UniqueOrdersCount = COUNTROWS(VALUES('Table(2)'[order]))

 

The final output is shown in the following figure:

vjunyantmsft_0-1698124543180.png

Best Regards,

Dino Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

it should be 1 

mina97
Helper III
Helper III

wrong it gived zero 😞

Dangar332
Super User
Super User

Hi, @mina97 

try below just adjust your table aand column name 

final =
var a = DISTINCTCOUNT('practice'[order])
var b = CALCULATE(DISTINCTCOUNT('practice'[order]),practice[status]="resumited")
return a-b
 
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to give kudos

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.