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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Sondre
Frequent Visitor

Only used data with item count over given number

Hi,

 

I have a page for scrap tracking showing:

  • A matrix for Employee (Emp), with count, scrap and scrap%.
  • A matrix with corresponding Gridsheet scrap location (B02 - T30).

I want to sort it so to only use data with Emp count higher than 300. This is OK with filtering in the matrix for Emp, but I want it to also apply for the Gridsheet table so than only data for Emp count over 300 is taken into account.

I also have a slicer for date on the page. The >300 should be working within the slicer.

Sondre_0-1702393743971.png

 

I've tried adding this for the Gridsheet matrix, but it only gives me a number with blank gridsheet location.

 

Measure = CALCULATE(COUNT(Query[Gridsheet_location]), FILTER(Query, COUNT(Query[Emp]) >= 300))

 

 

Any suggestions?

2 REPLIES 2
mh2587
Super User
Super User

Measure = //Try this 
CALCULATE(
    COUNTROWS('Gridsheet'),
    FILTER(
        VALUES('Gridsheet'[Emp]),
        CALCULATE(
            COUNTROWS('Query'),
            FILTER('Query', 'Query'[Emp] = 'Gridsheet'[Emp])
        ) >= 300
    )
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Sondre
Frequent Visitor

Thanks for the reply!

I have all data for this in one query. Tried the following. Total is correct, but no gridsheet location is shown.

Measure = 
CALCULATE(
    COUNT(Query[Gridsheet_location]),
    FILTER(
        VALUES(Query[Emp]),
        CALCULATE(COUNTROWS(Query)) >= 300
    )
)

 

Sondre_0-1702460374557.png

 

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.

Top Solution Authors