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
Neutralcats
New Member

Changing cards based on filter selected

Hi, I have a report that takes state, subregional, and regional data and you can filter via a slicer on all three components. For instance, I can select Southeast, or East North Central, or State.. etc. and I can get most of my visuals to show me the subset of what I've selected.

 

HOWEVER, I have some cards that show things like "Household Income", "# of Vehicles", "Life expectancy", etc. They're all set up with dax measures and they look like this:

 

AverageLifeExpectCompare =
VAR averageLifeExpect =
CALCULATE( AVERAGE (Sheet1[Life Expectancy]),ALL(Sheet1[State]))
RETURN
IF (AVERAGE(Sheet1[Life Expectancy]) >= averageLifeExpect, "Above Average","Below Average")
 
Is there any way I can dynamically set this up with [Region] and [Subregion]? That way, if a viewer selects "West" in the slicer, it will show the average life expectancy for western states.
 
Also, I have a card that has the state name. How would I dynamically measure that so it will show the exact subselection (i.e.: if someone clicks on "West", it will show "West" rather than "Alabama" as the first state)? Thank you!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Neutralcats , the above measurements should work at region and subregion with GT(Overall, no filter). But if you want to filter only the selected total you can use allselected

 

like

AverageLifeExpectCompare =
VAR averageLifeExpect =
CALCULATE( AVERAGE (Sheet1[Life Expectancy]),allselected(Sheet1[State]))
RETURN
IF (AVERAGE(Sheet1[Life Expectancy]) >= averageLifeExpect, "Above Average","Below Average")

 

In case you want filter for Above and below avg, refer this video

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://www.youtube.com/watch?v=W4EF1f_k6iY

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Neutralcats , the above measurements should work at region and subregion with GT(Overall, no filter). But if you want to filter only the selected total you can use allselected

 

like

AverageLifeExpectCompare =
VAR averageLifeExpect =
CALCULATE( AVERAGE (Sheet1[Life Expectancy]),allselected(Sheet1[State]))
RETURN
IF (AVERAGE(Sheet1[Life Expectancy]) >= averageLifeExpect, "Above Average","Below Average")

 

In case you want filter for Above and below avg, refer this video

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://www.youtube.com/watch?v=W4EF1f_k6iY

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

Thank you! Do you know what I would do to dynamically change the card name? I don't have a measure for it, only a field.

 

I did get this far - 

RegionSubregionState =
SELECTEDVALUE (Sheet1[Region] ) & UNICHAR ( 10 )
    & SELECTEDVALUE (Sheet1[Subregion]) but it concatenates rather than replacing.

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.

Top Kudoed Authors