Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GSynchro
Regular Visitor

Calculate Minimum Across Multiple Tables by Row

Hello, so I have 4 tables that are related by a primary reference number. In each of the 3 tables, there is a column X, Y, and Z. What I would like to do is create a new table that lists the primary references, the minimum value of X across the 4 tables (for that row's primary reference), and do the same for Y and Z. I've been looking around and I can't seem to find a formula or anything that would achieve this. 

 

For instance, if we had:

Table1

Prim.Ref.     X      Y      Z

     1           2.1   3.3   4.2

     2           5.0   4.4   1.3

 

Table2

Prim.Ref.     X      Y      Z

     1           2.2   4.3   4.1

     2           5.5   3.5   1.6

 

Table3

Prim.Ref.     X      Y      Z

     1           2.0   3.5   5.3

     2           5.6   3.7   2.6

 

Then I'd like to create a table

MinTable

Prim.Ref.    mX   mY  mZ

     1           2.0   3.3   4.1

     2           5.0   3.5   1.3

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GSynchro ,

 

Try this 3 measures:

mX = Calculate(Minx(Union('Table 1','Table 2','Table 3'), [X]))
mY = Calculate(Minx(Union('Table 1','Table 2','Table 3'), [y]))
mZ = Calculate(Minx(Union('Table 1','Table 2','Table 3'), [Z]))

My output based on your sample data

Capture-8.PNG

Let me know fi this works

 

Thanks,

Tejaswi

 

 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

I suggest you try this approach:

  1. Append data from all 3 Tables into a 4th Table
  2. Select the first column of the 4th Table, right click and select "Unpivot other columns"
  3. To your visual, drag the first column to the row labels, second to the column labels and write this measure

=MIN(Data[Value])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @GSynchro ,

 

Try this 3 measures:

mX = Calculate(Minx(Union('Table 1','Table 2','Table 3'), [X]))
mY = Calculate(Minx(Union('Table 1','Table 2','Table 3'), [y]))
mZ = Calculate(Minx(Union('Table 1','Table 2','Table 3'), [Z]))

My output based on your sample data

Capture-8.PNG

Let me know fi this works

 

Thanks,

Tejaswi

 

 

Yes! This worked perfectly!!! Thank you so much

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors