Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 similar to this:
Thanks
Solved! Go to Solution.
@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] ) )
@Anonymous
One way is to have calculated table from modelling tab
Calculated Table = ADDCOLUMNS ( SUMMARIZE ( Table1, [3 digit Origin Zip], [3 digit Destination Zip], [Mode], "Lowest Rate", MIN ( Table1[Rate] ) ), "Carrier", CALCULATE ( MIN ( Table1[Carrier] ), TREATAS ( { ( [3 digit Origin Zip], [3 digit Destination Zip], [Mode], [Lowest Rate] ) }, Table1[3 digit Origin Zip], Table1[3 digit Destination Zip], Table1[Mode], Table1[Rate] ) ) )
@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] ) )
@Anonymous
...and another one:
ResultTable = FILTER ( Table1; Table1[Rate] = CALCULATE ( MIN ( Table1[Rate] ); ALL ( Table1[Rate]; Table1[Carrier] ) ) )
@AlB (I'm not a DAX expert) When I used the one you posted it gives me all the values rather than Just least cost carrier.
@Anonymous
Maybe you did something differently. It should work.
Check it out in this file. It yields exactly the same result as you showed above.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |