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
mhgottsc
Helper I
Helper I

Calculating the filtered count of something and grouping it by category

I have a table that looks like this:

mhgottsc_0-1659115530490.png

What I am wanting to to do is to create a new table that will Count the number of tokens where last_Updated_utc is in the current month and the value is 2.0 Qualify. I want this grouped by sales rep. If there is nothing to count I still want it to return zero for that rep.

It would look a bit like this: 

mhgottsc_1-1659115833452.png

Thanks, please feel free to ask any questions!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @mhgottsc ,

 

Do you want to create a virtual table like the following.

create_table = 
SELECTCOLUMNS (
    'Table',
    "Sales", 'Table'[Sales],
    "count",
        CALCULATE (
            COUNTROWS ( 'Table' ),
            ALLEXCEPT ( 'Table', 'Table'[Sales])
        )
)

vhenrykmstf_1-1659607136778.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @mhgottsc ,

 

Do you want to create a virtual table like the following.

create_table = 
SELECTCOLUMNS (
    'Table',
    "Sales", 'Table'[Sales],
    "count",
        CALCULATE (
            COUNTROWS ( 'Table' ),
            ALLEXCEPT ( 'Table', 'Table'[Sales])
        )
)

vhenrykmstf_1-1659607136778.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

lbendlin
Super User
Super User

That is standard Power BI functionality - even without code. What have you tried and where are you stuck?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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