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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

understanding the max and filters - HELP

Hi folks, 

I have the current table, which is filtered by the slicer at the left, so as you can see, last element is the wellid column is the highest number and that correspond to the vendor "XTO", i can get the name by simply MAX(table[operator]), but when just trying to set a logical measure it is when i struggle to find logic, if i can just simply write IF(MAX(TABLE[Operator]) = "XTO", 1, 0) works great, however my goal is to get only those 3 XTO elements as they are the latest operator value, however if somebody can explain the logic behind the if when referencing the same value at the same column, example.PNG

 

this would be the desire output,

RESULT.PNG

 

however i would like to understand the logic the the "XTO" is a dynamic variable, if i do this:

 

 

_amount = 
IF('Well List'[_check] = MAX('Well List'[Operator]), 1, 0) ALL THE ROWS = 1

 

 

 

Is the logic filtering and evaluating each row independently and so for each row thats the max value?

 

SECONDRESURLT.PNG

 

the challenge here is there are not another unique value other than the string name to reference.

 

 

3 REPLIES 3
FrankAT
Community Champion
Community Champion

Hi @Anonymous,

 

01-07-_2020_23-17-56.jpg

 

[1]

Each measure equals to the same result.

MAX(), MIN() or SELECTEDVALUE() of only one value is the value itself, ex.: MAX("XTO") = "XTO"

The measure says: If the value in Column1 is "XTO" then display 1 otherwise 0. All rows in the matrix gets a value.

 

[2]

Same as [1], but the measur says: If the value in Column1 is "XTO" then display 1 otherwise BLANK. The default behavior of the matrix doesn't show rows with blank values. You can change this behavior in the field options.

 

Regards FrankAT

Anonymous
Not applicable

Hi Frank, 

 

Thanks for your response, what about if XTO is a variable calculated as the Max wellid? it works great when i write ""XTO", however seems when i create a variable to calculate the max of operator based on max of wellid, that seems to return always 1, XTO will change once i select a different product or if there is a new newst client which this caseis the operator.

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try to use MAXX or MINX.

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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