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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
aashton
Helper V
Helper V

Show value in one column of table based on filter

I have data that includes Region, RVP, Site.  My table will display site totals by RVP by Region and will include inactive sites.  But the RVP I display for each region should be the one from active sites, not inactive.  How can I create a column to do this?

1 ACCEPTED SOLUTION

Hi @aashton ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1687938076918.png

Please try:

ActiveSites = CALCULATE(COUNT(biz_structure[Site]),FILTER('biz_structure',[Active_Inactive]="Active"))

AllSites = COUNT(biz_structure[Site])

Final output:

vjianbolimsft_1-1687938316079.png

Best Regards,

Jianbo Li

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

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @aashton 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
amitchandak
Super User
Super User

@aashton , if you have status field try a measure like like

 

Active =
var CurrentRegion = [Region]
var ActiveRVPs = calculatetable(VALUES(Table[RVP]), Table[Status] = "Active")
return
IF(
contains(ActiveRVPs, Table[Region], CurrentRegion),
CALCULATE(MAX(Table[RVP]), Table[Region] = CurrentRegion, Table[Status] = "Active"),
BLANK()
)

 

if you have dates refer approch of active employee in blog

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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

@amitchandak Thank you.  It was not allowing me to pick my regions field in the CONTAINS function, and received this error:

 

aashton_0-1687440427700.png

 

 

Hi @aashton ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1687938076918.png

Please try:

ActiveSites = CALCULATE(COUNT(biz_structure[Site]),FILTER('biz_structure',[Active_Inactive]="Active"))

AllSites = COUNT(biz_structure[Site])

Final output:

vjianbolimsft_1-1687938316079.png

Best Regards,

Jianbo Li

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

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.