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
soshaughnessy7
Frequent Visitor

Min for group while still being externally filterable

Ok I may be going crazy and just missed something simple, but this is driving me crazy.  I've searched and tried so many solutions at this point.  

 

I want to be able to calculate the minimum Unit Price for a group, in the randomized pic below the group would be Item_ID

 

soshaughnessy7_1-1618945114068.png

 

I can get this without an issue with calculate, min, all except Item_ID

 

The issue is that I also have roughly 50 columns that I still want to be filterable and affect the minimum value

 

For example, I want to add a page filter to exclude the category of cleaning. 

 

The results would then go from this:

soshaughnessy7_2-1618946103565.png

To this: 

soshaughnessy7_3-1618946146492.png

 

With the previous calculate it continues to show the min price as 50.  I can't anticipate how the table may expand over the years so even if typing 50 columns into a subsequent all selected filter was doable it wouldn't work long term.  

 

Any help would be greatly appreciated!

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @soshaughnessy7 ,

 

Try the following measure:

Minimum Values = MINX( FILTER(ALLSELECTED('Table'), 'Table'[ITEM_ID] = SELECTEDVALUE('Table'[ITEM_ID]) ), 'Table'[Unit Price])

 

MFelix_0-1619089923849.png

 

MFelix_1-1619089933797.png

MFelix_2-1619089959062.png

 

Result in attach PBIX file.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @soshaughnessy7 ,

 

Try the following measure:

Minimum Values = MINX( FILTER(ALLSELECTED('Table'), 'Table'[ITEM_ID] = SELECTEDVALUE('Table'[ITEM_ID]) ), 'Table'[Unit Price])

 

MFelix_0-1619089923849.png

 

MFelix_1-1619089933797.png

MFelix_2-1619089959062.png

 

Result in attach PBIX file.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much!!!  I didn't realize that you could use selected value in that manner.  I assumed it could only be assigned to literally selecting a value such as from a slicer.  So close yet so far away!

Hi @soshaughnessy7 ,

 

It can be used in several ways depending on the context in this case since you are showing the ID in each row of your table visualization the value can be pickedup, if you want to show agregatted values you can change the measure for something similar to this:

Minimum Values = MINX( FILTER(ALLSELECTED('Table'), 'Table'[ITEM_ID] in VALUES( 'Table'[ITEM_ID]) ), 'Table'[Unit Price])

Just an example may not work properly 😄


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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