cancel
Showing results for 
Search instead for 
Did you mean: 
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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.