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

Count Retuned Values by a Measure

Hi All, 

Dear @Anonymous 

Mr. yingyinr helped me to create a Measure to automatically calculate the active status of our participants. Thanks for your support!

In the following URL is the solution link, https://community.powerbi.com/t5/Desktop/Group-by-and-Conditions/m-p/1734027#M683555 

 

I have another table called Org_Type, has relation with Org_Tbl. What I am looking for now is, how to count number of active participants by type? Also, it is affected by same filter controls/visuals

mahmoud_1-1616424156496.png

Thanks for your support in advance!

Best Regards

Mahmoud

 

 

1 ACCEPTED SOLUTION
mahmoud
Helper I
Helper I

Hi Dears,

I tried this solution (Create a Measure)and it worked. 

Measure CountActive = 
COUNTROWS(
    FILTER(
        RELATEDTABLE(Org_Tbl),
        Org_Tbl[New measure for ActiveStatus] = "Active"
    )
)

 

Thanks for your support

Best Regards

Mahmoud

 

 

View solution in original post

3 REPLIES 3
mahmoud
Helper I
Helper I

Hi Dears,

I tried this solution (Create a Measure)and it worked. 

Measure CountActive = 
COUNTROWS(
    FILTER(
        RELATEDTABLE(Org_Tbl),
        Org_Tbl[New measure for ActiveStatus] = "Active"
    )
)

 

Thanks for your support

Best Regards

Mahmoud

 

 

mahmoud
Helper I
Helper I

Dear @amitchandak 

Thanks for your prompt response, I tried your suggestion, it did not give me the accurate figures. Where, as you see in the photo, it is give me incorrect figures with incorrect Types.

mahmoud_0-1616441988782.png

 

I did a manual calculation, I have two types only and the total figure is 33 (11 for first and 22 for the second type).

 

Best Regards

Mahmoud

amitchandak
Super User
Super User

@mahmoud , You have try a measure like

 

countx(values('Org_tbl'[Org_type]), if([Measure ActiveStatus] ="Active", [Org_type], blank()))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.