cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
devenchj Frequent Visitor
Frequent Visitor

Re: How to Find Column's Minimum value based on other columns group

Hi @v-huizhn-msft ,

 

I tried as suggested, but its giving similar value as row and not minimum. used all other expression suggested till now and that gives Minimum Days per Plant across (not considering CALENDAR_ID,Distributor_ID).

 

Change month slicer value to 491 and see in attached pbix file. https://1drv.ms/f/s!AhX63mpgfjowagcrNOvuf5Srz5A

 

Column1 = CALCULATE ( MIN ( TRANSIT_TIME_MLY[TRANSIT_DYS] ), ALLEXCEPT ( TRANSIT_TIME_MLY, TRANSIT_TIME_MLY[PLANT_ID]),TRANSIT_TIME_MLY[MLY_CALENDAR_ID] )

 

Column2 = CALCULATE(MIN(TRANSIT_TIME_MLY[TRANSIT_DYS]),FILTER(TRANSIT_TIME_MLY,TRANSIT_TIME_MLY[PLANT_ID]=EARLIER(TRANSIT_TIME_MLY[PLANT_ID])))

 

Measure3 = MINX(FILTER(SELECTCOLUMNS(ALLSELECTED(TRANSIT_TIME_MLY),"index",TRANSIT_TIME_MLY[Index],"Min",MINX(FILTER(TRANSIT_TIME_MLY,TRANSIT_TIME_MLY[PLANT_ID]=EARLIER(TRANSIT_TIME_MLY[PLANT_ID])),TRANSIT_TIME_MLY[TRANSIT_DYS])),[index]=MAX(TRANSIT_TIME_MLY[Index])),[Min])

 

Image 8.png

 

Thanks,

Devendra

devenchj Frequent Visitor
Frequent Visitor

Re: How to Find Column's Minimum value based on other columns group

Its resolved now, I created new combined column instead, and used with all suggested  expressions and all provided solutions worked perfectly.

 

PlantGroup = TRANSIT_TIME_MLY[DISTRIBUTOR_ID] & "~" &TRANSIT_TIME_MLY[PLANT_ID] & "~" &TRANSIT_TIME_MLY[MLY_CALENDAR_ID]

 

thanks you all for your help Smiley Happy 


Image 9.pngImage 10.png

-Devendra

Re: How to Find Column's Minimum value based on other columns group

I am having a similar problem "EARLIER/EARLIEST refers to an earlier row..."

 

This is the formula I was using.

 

MIN Apartment Code = CALCULATE(MIN(DynamoAreas[Area]),FILTER(DynamoAreas,DynamoAreas[Apartment Code]=EARLIER(DynamoAreas[Apartment Code])))

LW Member
Member

Re: How to Find Column's Minimum value based on other columns group

Hi, I have got a same scenario and the measure @v-huizhn-msft  provided works correctly but difficult to understand the concept behind, how do i filter out another column within the same table to get the minimum along with other filtered columns? i.e. for example first three columns are correctly filtered out with your @v-huizhn-msft  solution but I'm not sure how to filter out the last column using the same measure.

 

Capture3.PNG

Please advise. Thanks