Forum Discussion
Anonymous
7 years agoNot applicable
Create a new Table to show the Minimum value based on multiple criteria
I'm trying to create a new Table to just have the minimum cost carrier based on 3 criteria - Origin Zip, Destination Zip, Mode This is my initial data: I'm looking for end result to be si...
- 7 years ago
Anonymous
Another way..Shorter Code
Calculated Table 1 = GENERATE ( SUMMARIZE ( Table1, [3 digit Origin Zip], [3 digit Destination Zip], [Mode], "Lowest Rate", MIN ( Table1[Rate] ) ), SELECTCOLUMNS ( FILTER ( Table1, [Rate] = [Lowest Rate] ), "Carrie", [Carrier] ) )
Zubair_Muhammad
Community Champion
7 years agoAnonymous
Another way..Shorter Code
Calculated Table 1 =
GENERATE (
SUMMARIZE (
Table1,
[3 digit Origin Zip],
[3 digit Destination Zip],
[Mode],
"Lowest Rate", MIN ( Table1[Rate] )
),
SELECTCOLUMNS ( FILTER ( Table1, [Rate] = [Lowest Rate] ), "Carrie", [Carrier] )
)
AlB
Community Champion
7 years agoAnonymous
...and another one:
ResultTable =
FILTER (
Table1;
Table1[Rate] = CALCULATE ( MIN ( Table1[Rate] ); ALL ( Table1[Rate]; Table1[Carrier] ) )
)