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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
gauri
Helper III
Helper III

How to filter entire visual on the basis on minimum value from one column

Hello All,

 

I am facing this issue :

from the Screen shot below i have a single facilityname as A, the values which are displayed are for 1 particular resident which has different sort value and icd code value. i need to display the residents details in such a way that evertime for each resident it should pick value of icd code which has minimum sort number. Here in this case the minimum sort number is 11 so i would be displaying on that paerticular icd code with teh resident name.

clinical.PNG

Can someone help me this scenario.

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@gauri , Add a measure like this

measure =
var _min = minx(allselected(Table),Table[sort])
return
calculate(countrows(Table), filter(allselected(Table),Table[sort]=_min))

 

Or all measure you want ; should use this filter condition

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi  @gauri ,

 

Try measure as below;

measure =
var _min = minx(Filter(all(Table),'Table'[Facility name]=MAX('Table'[Facility name])&&'Table'[resno]=MAX('Table'[resno])),Table[sort])
return
calculate(MAX(Table[icd code]), filter(all(Table),Table[sort]=_min))

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

amitchandak
Super User
Super User

@gauri , Add a measure like this

measure =
var _min = minx(allselected(Table),Table[sort])
return
calculate(countrows(Table), filter(allselected(Table),Table[sort]=_min))

 

Or all measure you want ; should use this filter condition

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Very helpful, I could solve my problem too with this information. Thank you so much!

@amitchandak 

i tried this measure, aaplied filter on resident number too which workd fine, but when i select resno number in the slicer then it gives me perfect value for icd code according to min sort value, but as soon as i remove slicer of resno i should be able to see all the residents in that time period but i am not able to. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.