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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help to get a measure that uses two tables

Hello all,

 

I'm trying to replace an excel calculation for a power bi dax expression. This calculations are related to car travels. at the excel i have the following columns in order to get to the total unit cost:

 

Same dayQtt HoursUtil. <  1day   
000   
000   
10.1256.24   
IF(CheckOutDate=Check InDate,1,0)IF(SameDay=1,CheckOutDate-CheckInDate,0)IF(Qtt Hours>0.1666666667,Vehicles['DailyValue'],Vehicles['HalfDailyValue'])   

 

 

I've tried to create this on my power bi file, the same day column and the qtt hours was easy, I've created a new column on my main table. But now I'm struggling to get the third columns.

 

I'm trying the following sentence but getting this error:

 

Capture.PNG

 

Thanks in advance,

Miguel 

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Anonymous 

What code are you using to create the column CarpoolBackup1[QtdHoras] ?

The error is saying that to create CarpoolBackup1[utilMaiordia] you need the value from CarpoolBackup1[QtdHoras] but the value in CarpoolBackup1[QtdHoras] relies on the value in CarpoolBackup1[utilMaiordia]

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.