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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
arimoldi
Resolver I
Resolver I

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 I
Resolver I

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 I
Resolver I

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.