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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Divide columns from two different tables in calculated column

Hello everyone,

I am trying to divide speed with Max speed. I created a measure to calculate speed which works fine. But when I try to divide this measure by its max value, it does not accept the code and says-

"Column 'Speed1' in table 'Table2' cannot be found or may not be used in this expression."

 

So instead of a measure, I tried to calculate speed in a calculated column. But it is giving the wrong value.

Speed 1 is measure n speed 1 col ios calculated column.Speed 1 is measure n speed 1 col ios calculated column.

So I wanted to do the following-

Speed1 = divide volume by time 

Final speed = (Speed1/max speed1)*100

Here is the data-

These two tables are linked with each other on IDThese two tables are linked with each other on ID

I used the following code -

Speed1 = SUM(Table2[Volume])/sum(Table1[Time])
Time = (DATEDIFF('Table1'[start time]'Table1'[end time],SECOND))

 

Thanks in Advance! Looking forward to it!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below to get the Speed2 base on the measure [Speed1] :

Speed2 = 
VAR _tab =
    SUMMARIZE ( ALLSELECTED ( 'Table1' ), 'Table1'[ID], "@speed", [Speed1] )
VAR _maxspeed =
    MAXX ( _tab, [@speed] )
RETURN
    DIVIDE ( [Speed1], _maxspeed ) * 100

yingyinr_0-1645006655296.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below to get the Speed2 base on the measure [Speed1] :

Speed2 = 
VAR _tab =
    SUMMARIZE ( ALLSELECTED ( 'Table1' ), 'Table1'[ID], "@speed", [Speed1] )
VAR _maxspeed =
    MAXX ( _tab, [@speed] )
RETURN
    DIVIDE ( [Speed1], _maxspeed ) * 100

yingyinr_0-1645006655296.png

Best Regards

calerof
Impactful Individual
Impactful Individual

Hi @Anonymous ,

You can use this code:

Percentage vs Max Speed = 
VAR MaxSpeed = 
CALCULATE(
    MAXX(Table_Speed, Table_Speed[Speed]),
    ALL(Table_Speed)
)

RETURN
DIVIDE(
    Table_Speed[Speed],
    MaxSpeed
)

 

image1.png

Hope it helps.

Regards,

Fernando

amitchandak
Super User
Super User

@Anonymous , A column with measure will not work properly.

Create speed 1 Col as measure

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.