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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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