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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
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.