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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Philfound1199
Frequent Visitor

Help Creating a measure that is filtered by another measure

I'm trying to create a measure that provides the percentage of shipments that meet a particular criteria. Specifically I want to divide the number of shipments whose average miles per shipment is  >=100 than the total number shipments.

Trying to use this DAX to get the count of shipments whose avg miles are >= 650

_shipments ex Shuttles IM Compatability =
CALCULATE(
    [Count of Shipments],
    NOT('Attributes'[Carrier SCAC] IN { "xxx", "xxxx", "xxxx" }), [Average Miles per Shipment]>=650)

 

getting this error

Philfound1199_0-1694096552155.png

 

I think the issue I'm having here is that the count of shipments and the average miles per shipment are values coming from a SQL server so the count and average functions are not happening in power bi so the ability to filter is limited since those valuse are in seperate tables and not connected. If it's not possible thats fine but I would like some help understanding what the above error is actaully saying.

1 REPLY 1
Philfound1199
Frequent Visitor

I actually think I figured it out getting some help from this post Solved: DAX Filter - greater-than or equal is not working - Microsoft Fabric Community

So instead of:

_shipments ex Shuttles IM Compatability =
CALCULATE(
    [Count of Shipments],
    NOT('Attributes'[Carrier SCAC] IN { "xxx""xxxx""xxxx" }), [Average Miles per Shipment]>=650)

Using

_shipments ex Shuttles IM Compatability =
CALCULATE(
    [Count of Shipments],
    NOT('Attributes'[Carrier SCAC] IN { "xxxx", "xxxx", "xxxx" }), FILTER(Attributes, [Average Miles per Shipment]>=650))

So adding that filter function with the table instead of just the measure.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors