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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
DataSkills
Resolver I
Resolver I

Using measure shows records that should be excluded (sample file included)

Hello, 

The attached PBIX file shows the issue. In essence, when using the measure (shown in the lower table), the slicer doesn't exclude any people. In the image below, I picked a specific facility (ID = 9), and as you can see, the top table shows only residents from that facility, whereas the lower table still shows residents from other facilities. 

DataSkills_1-1723025599711.png

I can solve the problem using a calculated column, but I am trying to NOT create a calculated column if I can help it. 

 

Click HERE to open the PBIX file. Then click the download button at top right to download the file. (See green arrow for download button). 

DataSkills_0-1723025556518.png

 

Thank you in advance. 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

I am not sure if I understood your semantic model correctly, but I suggest to try to start from the below measure. And then, I believe you can get to the goal that you need.

 

Weight Category Measure =
SWITCH (
    TRUE (),
    COUNTROWS ( Residents ) >= 1
        && ISBLANK ( MAX ( Residents[Weight] ) ), "No recorded weight",
    COUNTROWS ( Residents ) >= 1
        && MAX ( Residents[Weight] ) < 30, "Under 30kg in weight",
    COUNTROWS ( Residents ) >= 1
        && MAX ( Residents[Weight] ) > 130, "Over 130kg in weight",
    COUNTROWS ( Residents ) >= 1, "Normal weight"
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, 

I am not sure if I understood your semantic model correctly, but I suggest to try to start from the below measure. And then, I believe you can get to the goal that you need.

 

Weight Category Measure =
SWITCH (
    TRUE (),
    COUNTROWS ( Residents ) >= 1
        && ISBLANK ( MAX ( Residents[Weight] ) ), "No recorded weight",
    COUNTROWS ( Residents ) >= 1
        && MAX ( Residents[Weight] ) < 30, "Under 30kg in weight",
    COUNTROWS ( Residents ) >= 1
        && MAX ( Residents[Weight] ) > 130, "Over 130kg in weight",
    COUNTROWS ( Residents ) >= 1, "Normal weight"
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi Jihwan_Kim, thank you for that solution. That seems to have done the trick! 🤗

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.