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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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