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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.