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

Re - published: Dax measure to filter the data in the chart only by the last value name

Hi guys,

 

I have tried different options with no success and wondering if you please help, as you can see in the pic i have a chart with values from 2 tables, 'WELL LIST' contains the wellid, wellname, operator, final depth, edr final and "DRILLCONNECTION": rig_job, visualization and weight.  the result at the picture is based on a filter for one client,  so, how can i filter this chart to show the last 3 values from operator where is "XTO" but dynamically?  if the MAX(Operator] = "XT0" how can i use this expression to generate the filter?

 

Really hope you

6 REPLIES 6
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

You could create a measure and add this measure into the visual filter of the chart.

Measure = IF(MAX('Table'[operator])="XTO",1,0)

Capture11.JPG

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

Anonymous
Not applicable

Almost there thanks so much, last question, so XTO is the max value of the column operator for that specific client, meaning not always will be XTO, how can I make that dynamic? 

Hi @Anonymous 

Measure = VAR max1=calculate(max('Table'[operator]),allselected('Table')) return IF(MAX('Table'[operator])=max1,1,0)

or 
Measure =
VAR max1 =
    CALCULATE (
        MAX ( 'Table'[operator] ),
        FILTER ( ALLSELECTED ( 'Table' ), [column] = your_filter_condition )
    )
RETURN
    IF ( MAX ( 'Table'[operator] ) = max1, 1, 0 )

 

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

Anonymous
Not applicable

sorry forgot pictureNORESULT.PNG

Anonymous
Not applicable

Thanks for your answer,

 

Still facing the same problem, if i do not pass the string directly it does not work, any idea why is happening? the Max should be Aethon but still set #1 in the whole table.

 

Cheers

Anonymous
Not applicable

table.PNG

 

Sorry seems the picture was not uploaded.

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.

Top Solution Authors