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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
zenton
Helper II
Helper II

Filtering Count by related table

Hi

I am trying to filter PA Status so it only calculates the values with the highest status

zenton_3-1698618841158.png

Table Status Sort (related table)
zenton_0-1698618183794.png

PA Status = SUM('Central Scada'[Available]) & " of " &  SUM('Central Scada'[Installed])

zenton_1-1698618230144.png 

The highest staus in this example is Red so the PA Status should be 3 of 4

 
ThanksRodney

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @zenton ,

 

Here are the steps you can follow:

1. Create measure.

PA Status =
var _highest=
MAXX(
    FILTER(ALL('Table Status Sort'),
    'Table Status Sort'[Sort]=MINX(ALL('Table Status Sort'),'Table Status Sort'[Sort])),[Status])
return
SUMX(
    FILTER(ALL('Central Scada'),
    'Central Scada'[Status]=_highest),[Available])
&" of "&
SUMX(
    FILTER(ALL('Central Scada'),
    'Central Scada'[Status]=_highest),[Installed])

2. Result:

vyangliumsft_0-1698807986864.png

 

 

Best Regards,

Liu Yang

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

1 REPLY 1
Anonymous
Not applicable

Hi  @zenton ,

 

Here are the steps you can follow:

1. Create measure.

PA Status =
var _highest=
MAXX(
    FILTER(ALL('Table Status Sort'),
    'Table Status Sort'[Sort]=MINX(ALL('Table Status Sort'),'Table Status Sort'[Sort])),[Status])
return
SUMX(
    FILTER(ALL('Central Scada'),
    'Central Scada'[Status]=_highest),[Available])
&" of "&
SUMX(
    FILTER(ALL('Central Scada'),
    'Central Scada'[Status]=_highest),[Installed])

2. Result:

vyangliumsft_0-1698807986864.png

 

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.