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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Abevann
Helper III
Helper III

Filter the lowest value over a threshold

Guys, 

 

I guess is a very simple question, the biggest problem is how to ask the question I guess. I have a table with articles and price; nevertheless the customer for whatever reason, have values that make no sense; this table for instance:

ItemCost
Cereal250
Cereal220
Cereal320
Cereal240
Cereal300
Cereal20

I have to get the lowest price (in this table 20), but in this case this one seems to be wrong. So I would like to stablish a theshold, for instance 20%. That means that if the cost value is less than average minus 20% this should be a mistake and I should take the lowest price over the threshold (in this instance 220 since the average minus 20% is 180). So I should not take into account the wrong value; how to do so?

 

Thanks a lot, regards,

Abelardo

3 REPLIES 3
sevenhills
Super User
Super User

Glad you are able to solve on your own and my notes helped you in attaining the result.

 

Appreciated for posting the solution for others.

Regards

sevenhills
Super User
Super User

something along these lines? 

 

1. Sort the data by Item and cost i.e., Add an index column based on the item

2. Calculate the previous value

 

http://datacornering.com/calculate-last-or-previous-value-within-power-bi/

 

3. Calculate the thresold value and decide to display what you need to ...

 

If this is not the one you are looking, please ignore

Hey Sevenhills,

 

Thanks for your quick reply. Unfortunately, my description is not so good; nevertheless taking a look of what you sent me, some ideas came into my head, and got the solution. 

 

This DAX give me what I am looking for, I added it for anyone that should find it helpful.

 

Minimum price = CALCULATE(MIN(INV1[Price]),
FILTER(INV1, INV1[Price] > (AVERAGE(INV1[Price]) * 0.80))
)
 
Thanks, regards,
Abelardo

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.