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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
andrevdhoeven
Regular Visitor

Using a value from table 2 to makes a calculation

Example.png

 

Asked before now with an example.

In PowerBI I like to make a calculation with numbers from 2 tables.

1. sum the hours of a person from table 1 (John has 30 + 5 = 35 hours)

2. divide this sum with the number in table 2 on the record whichs has John's name, in this exemple 35/5.

Powerbi gives an error that says values from table 2 has to be a sum, max or minimum value (aggregation)

How can I use the value which is found in John's record in table 2?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@andrevdhoeven ,

Try like

divide(sum(Table1[Hour]), MAx(Table2[Hour]))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@andrevdhoeven ,

Try like

divide(sum(Table1[Hour]), MAx(Table2[Hour]))

divide(sum(Table1[Hour]), MAx(Table2[Hour]))

Using this formula will use the highest value form table 2? Not the value of John's record I suppose? 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.