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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gghanem
New Member

Calculated measure not responding to my slicers

Hello.

 

I have created a dashboard for my project that includes various demographic information (e.g. gender, nationality, vulnerabilities...etc.). Each case may contain multiple vulnerabilities.

 

I want my graph on Power BI to include the values for each individual vulnerability (similar to countif on excel). Most importantly, I didn't want the cells that contain multiple vulnerabilities to result in a new aggregated type of vulnerability.

 

Through a google search, I was able to find the following DAX formula which I repeated the same steps for all of the vulnerabilities:

Child/ Youth = CALCULATE(COUNT(Sheet1[Vulnerability,FILTER(ALL(Sheet1),[Vulnerability]="Child/ Youth"))
 
The measure worked perfectly and I was able to create a clear donut chart using the newly calculated measures.
 
However, my chart is not responding to my slicer.
 
How can I fix that?
3 REPLIES 3
gghanem
New Member

Hello @tamerj1 

 

Thanks for the advice.

 

I tried this but it resulted in the aggregation that I was trying to avoid. 

gghanem_0-1678348227253.png

The problem here is that some cases have multiple vulnerabilities at once but I don't want to highlight the combination of vulnerabilities.

Rather, the graph that I want would only show the 6 primary categories as such:

gghanem_1-1678348357734.png

This graph was created from the calculated measures using the formula I had shared in the first message.

 

Is there a way to accomplish this without severing the connection to the slicers?

@gghanem 
Just create a new calculated column in the data table that categorize/group them into 6 groups.

Somthing like:
Category =
SWITCH (
TRUE ( ),
'Table'[Vulnerability] IN { "CHILD/YOUTH",  "CHILD /YOUTH",   "CHILD/ YOUTH",  "CHILD / YOUTH" }, "CHILD/YOUTH",
etc..

tamerj1
Super User
Super User

Hi @gghanem 
The ALL function removes all filters. As of you measures you can use

Child/ Youth =
CALCULATE (
    COUNT ( Sheet1[Vulnerability] ),
    Sheet1[Vulnerability] = "Child/ Youth"
)

However there is no need to create a seperate measure for each Vulnerability rtaher you can place the [Vulnerability] column in the legend of the donut chart and place the following measure in the values

Count = COUNT ( Sheet1[Vulnerability] )

or even 

Count = COUNTROWS ( Sheet1 )

and it should work

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.