cancel
Showing results for
Did you mean:
Occasional Visitor

## How to to use a measure as a filter in DAX?

Hi Everyone,

I am dealing with some sales information, and need some assistance. Using power pivot, i am trying to use the Calculate function to determine the average sales/week when the price is above a certain point.

The price field of my dataset is a calculated measure, and I have been unable to figure out how i can use that measure to filter out the lines of data that are below the threshold. I have tried a variety of things, but one thing i found on this forum was to use a variable in place of the measure.

FYI The sheet called "Min Price" is a disconnected table, and my goal is to vary the value of that table using a slicer, in order to test mutliple pricepoints.

var m = Sheet1[Price]

Calculate(Sheet1[Average of Week Sales],m>'Min Price'[Min Price])

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

## Re: How to to use a measure as a filter in DAX?

@jsakel,

```Measure= var m = SELECTEDVALUE('Min Price'[Min Price],1)

Return Calculate(Sheet1[Average of Week Sales],FILTER(Sheet1,[Price]>m))```

If it doesn't return your expected result, please share sample data of your table and post desired result following the guide in the blog below.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Moderator

## Re: How to to use a measure as a filter in DAX?

@jsakel,

```Measure= var m = SELECTEDVALUE('Min Price'[Min Price],1)

Return Calculate(Sheet1[Average of Week Sales],FILTER(Sheet1,[Price]>m))```

If it doesn't return your expected result, please share sample data of your table and post desired result following the guide in the blog below.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Community Highlights

Find out what's new in the Power BI Community!

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 105 members 1,607 guests
Recent signins: