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

Compare hour from different table

Hi all

I have a column Dim Hours, that contains 24 hours .

table a

vjcaldeira_1-1610049630145.png

and I have other column in other table that contains some hours for exemplo 

table b
12:00:00
12:30:00
17:00:00

I would like to compare this date for exemplo
IF( tableA.hour >= tableB.hour,1,0)

The problem is that the table A there are a lot line and Table B they are 10 line for exemplo, so i need compare.


Thanks a lot


2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , do these tables has any thing in common.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

You can actually create a new column in the required table. and then use that for you calculations.

Example in video - https://www.youtube.com/watch?v=czNHt7UXIe8

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
Anonymous
Not applicable

Thanks a lot,
with this cod I could solve my problem, make  a looping comparind the datas from the tables

Hora Cor Parada =

var selecthora = SELECTEDVALUE(E_DIM_HORA[HORA])
var result =
CALCULATE(
SELECTEDVALUE(Fato[HoraInicio]),
FILTER(Fato,
selecthora >= (Fato[HoraInicio])&&
selecthora <= Fato[HoraFim] ),Fato[MOVIMENTO] = "2")
return
If(result,1,0)

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (27)