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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nidhs909
Frequent Visitor

Total filtered count rows in matrix

Hello, 

 

I have a Total Threshold measure counted as 

Threshold = DISTINCTCOUNT(Merged[JobID])/DISTINCTCOUNT(Merged[JobRig])
What i would like to achieve is using the same total threshold, count bouns amount for each employee. When I use the same threshold measure in matrix, it calculatets for each employee, wherein i need for total threshold for selected period. 

 

nidhs909_0-1735028459017.png

 

Thank you in advance. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @nidhs909 

 

Thanks for the reply from lbendlin and Laxmanjatoth .

 

Here is the test I did for your reference.

 

My sample:

vxuxinyimsft_0-1735107100868.png

 

Create a measure as follows

Threshold = 
CALCULATE(
    DISTINCTCOUNT(Merged[JobID]) / DISTINCTCOUNT(Merged[JobRig]),
    ALLSELECTED(Merged)
)

 

Output:

vxuxinyimsft_1-1735107207038.png

 

vxuxinyimsft_2-1735107254992.png

 

If the above does not solve your problem, as lbendlin said, we need example data and desired results based on the example data to better help you. Please remove any sensitive data in advance.

 

Best Regards,
Yulia Xu

 

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

5 REPLIES 5
Laxmanjatoth
Resolver I
Resolver I

hello use below measures 

Total Threshold (Selected Period) =
CALCULATE(
DISTINCTCOUNT(Merged[JobID]) / DISTINCTCOUNT(Merged[JobRig]),
ALL(Merged[EmployeeID]) -- Remove employee-specific context (if your matrix has an employee dimension)
)

lbendlin
Super User
Super User

use CALCULATE and REMOVEFILTERS to calculate the value across all selected items regardless of employee.

thank you for your help but it did not solve my issue as i need filters as well. 

 

The total Threshold is counted based on the rows selected between the dates. I want to calculate the bonus amount using the 4.4 value for each employee, how do I do that?

nidhs909_0-1735044099857.png

 

Anonymous
Not applicable

Hi @nidhs909 

 

Thanks for the reply from lbendlin and Laxmanjatoth .

 

Here is the test I did for your reference.

 

My sample:

vxuxinyimsft_0-1735107100868.png

 

Create a measure as follows

Threshold = 
CALCULATE(
    DISTINCTCOUNT(Merged[JobID]) / DISTINCTCOUNT(Merged[JobRig]),
    ALLSELECTED(Merged)
)

 

Output:

vxuxinyimsft_1-1735107207038.png

 

vxuxinyimsft_2-1735107254992.png

 

If the above does not solve your problem, as lbendlin said, we need example data and desired results based on the example data to better help you. Please remove any sensitive data in advance.

 

Best Regards,
Yulia Xu

 

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

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.