Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi BI Community,
I have Table#1
IDProduction IDProcess TimeShiftBegin TimeShiftEnd
1000 1 2018-04-19 06:45:00 2018-04-19 08:45:00
1001 2 2018-04-19 06:45:00 2018-04-19 08:45:00
1002 3 2018-04-19 06:45:00 2018-04-19 08:45:00
1003 1 2018-04-19 09:00:00 2018-04-19 11:00:00
1004 2 2018-04-19 09:00:00 2018-04-19 11:00:00
....
And Table#2
ScalingID Volume Lenght ScaledOn
22000 45 8 2018-04-19 06:45:18
22001 45 10 2018-04-19 06:45:43
22002 30 8 2018-04-19 06:46:04
In Table#2 I want to had Table#1[IDProduction] when ScaledOn date is between Table#1[TimeShiftBegin] and Table#1[TimeShiftEnd] and when Table#1[IDProcess] =2. Like this:
ScalingID Volume Lenght ScaledOn IDProduction
22000 45 8 2018-04-19 06:45:18 1001
22001 45 10 2018-04-19 06:45:43 1001
22002 30 8 2018-04-19 06:46:04 1001
....
22223 50 9 2018-04-19 09:01:22 1004
22224 35 10 2018-04-19 09:01:54 1004
22225 30 8 2018-04-19 09:02:14 1004
Note that this 2 tables have nothing in common.
Thanks for your help!
FRG
Solved! Go to Solution.
Hi @v-xjiin-msft,
I find something and it seem to work.
FilteredIDProduction2 = CALCULATE(
MAXA(Table#1[idProduction]);
FILTER(
Table#1;Table#1[TimeShiftBegin] <= (Table#2[ScaledOn]) &&
Table#1[TimeShiftEnd] >= (Table#2[ScaledOn]) &&
Table#1[idProcess] = 2
)
)
Thanks again
Hi @Anonymous,
Try this measure:
Filtered IDProduction =
CALCULATE (
MAX ( 'Table#1'[IDProduction] ),
FILTER (
'Table#1',
'Table#1'[TimeShiftBegin] <= MAX ( 'Table#2'[ScaledOn] )
&& 'Table#1'[TimeShiftEnd] >= MAX ( 'Table#2'[ScaledOn] )
&& 'Table#1'[IDProcess] = 2
)
)
Thanks,
Xi Jin.
Hi @v-xjiin-msft,
With this measure I get the same (the last) IDProduction (where IDProcess =2) for all rows in Table#2.
Thanks
FRG
Hi @v-xjiin-msft,
I find something and it seem to work.
FilteredIDProduction2 = CALCULATE(
MAXA(Table#1[idProduction]);
FILTER(
Table#1;Table#1[TimeShiftBegin] <= (Table#2[ScaledOn]) &&
Table#1[TimeShiftEnd] >= (Table#2[ScaledOn]) &&
Table#1[idProcess] = 2
)
)
Thanks again
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 69 | |
| 50 | |
| 46 |