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

Measure for each row based on slicer

Hello Experts:)

 

A beginner qestion here. For quite some time I am trying to obtain something which seems to be relatively simple but I can't find an easy (or any, in fact) solution.

 

So I have a table which can be simplified to something like that. Any item can have any number of properties (>=1).

ItemProperty
AX
AY
AZ
BX
BY
CZ

 

Now I would like to select one or many properties, in this example let's say X and Z and build a table like below (Item - total number of properties - number of properties in the selected properties). 

ItemN propertiesN selected
A32
B21
C11

 

The last column seems to be the problem for me. I can't find a way to make it dynamically change as the selection criteria change.

Any hits appreciated!

 

Additional info: in the model I have two tables. One like the 1st table given here and the other one just with a list of properties (so just X, Y, Z).

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @frrt,

 

Try formula like below:

N property =
CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Item] ) )
N selected =
VAR sel =
    SELECTEDVALUE ( Slicer[Property] )
VAR con =
    IF ( MAX ( 'Table'[Property] ) = sel, 1, 0 )
RETURN
    [N property] - con

vhenrykmstf_0-1669795555723.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @frrt,

 

Try formula like below:

N property =
CALCULATE ( COUNTROWS ( 'Table' ), ALLEXCEPT ( 'Table', 'Table'[Item] ) )
N selected =
VAR sel =
    SELECTEDVALUE ( Slicer[Property] )
VAR con =
    IF ( MAX ( 'Table'[Property] ) = sel, 1, 0 )
RETURN
    [N property] - con

vhenrykmstf_0-1669795555723.png

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

vaibhavkale570
Resolver III
Resolver III

can you be more specific with your example?

cant really decide what's happening here. 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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