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
arimoldi
Resolver II
Resolver II

how to make a slicer field affect a measure for the total but not for the categories/group by

Hi,

 

I want to calculate the distinct count on a set of values in this way:

 

measure = CALCULATE(DISTINCTCOUNT(field_count),FILTER(ALL(fielf_fil_1,field_fil_2), flag=1))

 

the problem is that in the page I have a slicer based on another field which is aggregating the values when I show them in a card and I don't know how to make the slicer effecting the measure without making it group by; if I add this field to ALL function the measure won't be affected by the slicer field, but in this way the measure returns the total count grouped by the slicer field.

 

Any suggestion?

 

Thanks,

Andrea

 

1 ACCEPTED SOLUTION
arimoldi
Resolver II
Resolver II

Hi,

 

I solved this issue creating a new table with the domain of the values.

 

Hope it could be helpful for others.

 

Thanks,

Andrea

View solution in original post

3 REPLIES 3
arimoldi
Resolver II
Resolver II

Hi,

 

I solved this issue creating a new table with the domain of the values.

 

Hope it could be helpful for others.

 

Thanks,

Andrea

Daniel29195
Super User
Super User

Hello @arimoldi 

 

could you please share a visual representation of what you want to achieve ? 

best regards

Hi,

 

this is a sample dataset:

 

nameskilltarget
ax2
ay3
az0
bx2
by4
bz1
cx3
cy1
cz3
dx2
dy2
dz0
ex3
ey1
ez4

 

This the applied filter from the visual slicer: target = 2 and target = 3

 

This is what I would like to get:

skilltargetcount user
x24
x34

 

This is what I get:

skilltargetcount user
x23
x31

 

So the count user measure should count the overall amount of users for the selected target fields, but if I add the target field to the ALL function it does not consider the filter slicer values, instead if I don't add it to the ALL function the last above table i what I get.

 

Any suggestion?

 

Thanks,

Andrea

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 Solution Authors
Top Kudoed Authors