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

MIN function that is controlled by a slicer

Hello. Can you please help me with the below issue. I cannot seem to find anyone who can solve this.

 

I have been struggling to find a solution to my problem for some time now.

Below is a sample picture of my data source. I am trying to get BI to find the lowest price for each Order# and have another slicer that tells BI which Sellers to include when trying to find Min charge for each order.

BI com.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

Ideally, I would like to have a slicer showing all the seller options (A-D) and BI calculates the MIN cost for each order number based on the sellers included. 

 

Example: If I have sellers A & C selected in my slicer the MIN cost for each order # would be as follows.

Also need to calculate the total cost of the filtered results.

Order #               Seller              Cost

1                          C                    300

2                          A                    250

3                          A                    1700

 

Total Cost: 2250

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi jblack,

 

I'm afraid it's difficult to achieve that. Based on my test, allselected(table) or allselected(table, table[column]) will be implemented after allexcept.

Capture.PNG 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Jimmy,

 

I actually found a solution to this problem yesterday. 

To find the min value I used: Low Cost Measure =MINX(values(table1[seller]),CALCULATE(min(table1[cost])))

For total cost of the min values I used:

IF(

     HASONEVALUE (table1[table1[cost]),

     [low cost measure],

     SUMX(ALL(table1[Order#]),[low cost measure])

 

Now I am getting the desired result I was looking for. However, using these measure's I havent found a way to show the Seller associated with each cost for each order. So, still some work to be done. 

 

Let me know if you can crack that one!

 

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.