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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AllanBerces
Post Prodigy
Post Prodigy

Count per Progress Status

Hi good day,

Can pls someone help me on how can I achieved the output i desired on my table below.

 

AllanBerces_0-1733363801522.png

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from Irwan , please allow me to provide another insight:

Hi, @AllanBerces 

The solution provided by Irwan, using a calculated column, is a good idea.To facilitate your understanding, I have created the following example. Please refer to the attached PBIX file in the post.

 

If you need it as a measure, you can refer to the following code:

Count measure =
COUNTX (
    FILTER (
        ALLSELECTED ( 'Table01' ),
        'Table01'[Trade] = MAX ( 'Table01'[Trade] )
            && 'Table01'[Status] = MAX ( 'Table01'[Status] )
    ),
    'Table01'[Trade]
)

The output is as follows:

vlinyulumsft_0-1733375360336.png

You can also try the following calculated column:

Count1=
CALCULATE (
    COUNTROWS ( 'Table01' ),
    FILTER (
        ALLSELECTED ( 'Table01' ),
        'Table01'[Status] = EARLIER ( Table01[Status] )
            && 'Table01'[Trade] = EARLIER ( 'Table01'[Trade] )
    )
)
Count2 =
CALCULATE (
    COUNTROWS ( 'Table01' ),
    ALLEXCEPT ( 'Table01', Table01[Status], 'Table01'[Trade] )
)

Here's my final result, which I hope meets your requirements.

vlinyulumsft_1-1733375397253.png

 

Best Regards,

Leroy Lu

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks for the reply from Irwan , please allow me to provide another insight:

Hi, @AllanBerces 

The solution provided by Irwan, using a calculated column, is a good idea.To facilitate your understanding, I have created the following example. Please refer to the attached PBIX file in the post.

 

If you need it as a measure, you can refer to the following code:

Count measure =
COUNTX (
    FILTER (
        ALLSELECTED ( 'Table01' ),
        'Table01'[Trade] = MAX ( 'Table01'[Trade] )
            && 'Table01'[Status] = MAX ( 'Table01'[Status] )
    ),
    'Table01'[Trade]
)

The output is as follows:

vlinyulumsft_0-1733375360336.png

You can also try the following calculated column:

Count1=
CALCULATE (
    COUNTROWS ( 'Table01' ),
    FILTER (
        ALLSELECTED ( 'Table01' ),
        'Table01'[Status] = EARLIER ( Table01[Status] )
            && 'Table01'[Trade] = EARLIER ( 'Table01'[Trade] )
    )
)
Count2 =
CALCULATE (
    COUNTROWS ( 'Table01' ),
    ALLEXCEPT ( 'Table01', Table01[Status], 'Table01'[Trade] )
)

Here's my final result, which I hope meets your requirements.

vlinyulumsft_1-1733375397253.png

 

Best Regards,

Leroy Lu

 

Hi @Anonymous @Irwan , thank you very much for the reply. work as i need

Irwan
Super User
Super User

hello @AllanBerces 

 

please check if this accomodate your need.

Irwan_1-1733364975438.png

Count =
COUNTX(
    FILTER(
        'Table',
        'Table'[Trade]=EARLIER('Table'[Trade])&&
        'Table'[Status]=EARLIER('Table'[Status])
    ),
    'Table'[Trade]
)

 

Hope this will help.

Thank you.

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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