cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Look up min and max values

Hi

Im pretty new to POwer Bi and am having trouble getting this simple DAX to work, please help!

I have a table of customer rates for different tariffs:

 Customer Tariff Type Rate ABC Ltd 1 \$   50.00 CDE Ltd 1 \$   60.00 EFG Ltd 1 \$   70.00 ABC Ltd 2 \$   20.00 CDE Ltd 2 \$   30.00 EFG Ltd 2 \$   40.00 ABC Ltd 3 \$ 100.00 CDE Ltd 3 \$ 120.00 EFG Ltd 3 \$ 130.00

Then I have another table where I want columns to return the min and max amounts for each tariff to show like this:

 Tariff Type Min Rate Max Rate 1 \$   50.00 \$   70.00 2 \$   20.00 \$   40.00 3 \$ 100.00 \$ 130.00

Could someone help me with the dax formula to lookup the min/max value based on the Tariff Type. Im sure its easy, its elluding me though!

Thanks Tash

3 REPLIES 3
Responsive Resident

Hi @Anonymous ,

In fact, you don't need a DAX formula, you can get it by drag and drop Tariff Type to the table visualization and then drag and drop Rate column two times, and then just click in the rigth arrow:

Then just select Minimum operation for first Rate, and the Maximum operation for the second Rate:

and that's it you will get your desired table:

Hope this helps,

Regards,

Gian Carlo Poggi

Solution Sage

Yes you are right @gpoggi sometimes dax would be an overkill if you just want a simple table visual 😛

Solution Sage

Hello Tash/ @Anonymous ,

you could use this approach to create your table

```EndTable =
SUMMARIZE (
CustomerRates,
CustomerRates[Tariff Type],
"Min Rate", MIN ( CustomerRates[Rate] ),
"Max Rate", MAX ( CustomerRates[Rate] )
)```

Here you have an example file

If this post was helpful may I ask you to mark it as solution and give it some kudos?

Have a nice day!

BR,
Josef

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors