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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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